f1ca82ab

By: Tom Sydney Kerckhove <syd@cs-syd.eu>

Take the fetch once, and keep the internals out of the way

Integrating this into NixCI showed three things.

A caller handed a fetch on every request and was given only an issuer to
decide what to fetch, so it looked the issuer up a second time and then
had a Nothing to answer that could not happen. Each issuer carries its
own fetch now, handed in when the federation is built.

Audience collided with jose's in every module that both signs a token
and configures this, which was three of them. TokenAudience collides
with nothing.

KeySet exported five things only its own tests reached for, which is a
public surface shaped by a test suite. They are in KeySet.Internal.

The end-to-end suite allowed no clock skew, which only showed once a
second issuer ran on a second host and stamped a token a fraction of a
second ahead.

Total

21s

Created Started Finished

Time to Start Worker time Duration Time to finish Idle
Config 0s 1s 1s 1s 0s
Eval 1s 11s 11s 12s 0s
Build 11s 9s 9s 21s 0s
Suite 0s 21s 21s 21s 0s

Timeline

Config Eval Build
0s10s20s