The Jwks service: make_local and layer_remote build it,
and JwksService(resolve=...) makes one of a function (to refuse a
revoked kid, say).
Functions#
__init__#
__init__(resolve) -> None| Parameter | Type | Description |
|---|---|---|
resolve | Callable[[Selection], Effect[PublicKey, JoseError]] |
def __init__(self, resolve: Callable[[Selection], Effect[PublicKey, JoseError]]) -> None:
self._resolve = resolveresolve#
resolve(selection) -> Effect[PublicKey, JoseError]The public key that verifies a token with selection's
algorithm, kid and header; KeyNotFound or AmbiguousKey
when no single key matches.
| Parameter | Type | Description |
|---|---|---|
selection | Selection |
Returns Effect[PublicKey, JoseError]
def resolve(self, selection: Selection) -> Effect[PublicKey, JoseError]:
"""The public key that verifies a token with ``selection``'s
algorithm, ``kid`` and header; ``KeyNotFound`` or ``AmbiguousKey``
when no single key matches."""
return self._resolve(selection)