adk_jwt_verifier behaviour (erlang_adk v0.7.0)
View SourceAdapter behaviour for cryptographic JWT verification.
Implementations must validate the signature before returning claims and must never return a token or unredacted provider response in an error.
Summary
Types
-type config() :: #{provider := gen_server:server_ref(), client_id := binary(), signing_algs := [binary(), ...], trusted_audiences := [binary()], adapter_options => map()}.
-type error_reason() :: provider_unavailable | invalid_token.
Callbacks
-callback verify(Token :: binary(), Config :: config()) -> {ok, claims()} | {error, error_reason()}.