fa875cc2

Created Started Finished

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

Read the discovery document with a codec

It was the one piece of JSON this library read by hand, with
parseEither and withObject and a field at a time. It is a codec now, so
the document's shape is written once and the type carries its own
schema.

Issuer, TokenAudience and Algorithm have codecs too. NixCI was writing
those itself, as three orphan instances, because the types are here and
autodocodec was not.

The advertised algorithms are still read as text and filtered, because
every issuer advertises names this library has no constructor for:
Keycloak lists the whole HS family. A document naming one of those is a
document to read, not a document to refuse.

minBound is skipped for ConstConstructor: it is one constructor by
definition, so replacing a call to it with that constructor is a mutant
no test can tell from the original.