GitHub

JwksService

API reference for JwksService.

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
ParameterTypeDescription
resolveCallable[[Selection], Effect[PublicKey, JoseError]]
def __init__(self, resolve: Callable[[Selection], Effect[PublicKey, JoseError]]) -> None:
    self._resolve = resolve

resolve

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.

ParameterTypeDescription
selectionSelection

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)