Guardian.Token.Jwt.SecretFetcher behaviour (Guardian v2.2.4) View Source
Provides a behaviour that specifies how to fetch the secret for the token.
use Guardian.Token.JWT.SecretFetcher
to provide default implementations of each function.
Link to this section Summary
Link to this section Callbacks
Specs
fetch_signing_secret(module(), opts :: Guardian.options()) :: {:ok, term()} | {:error, :secret_not_found}
fetch_signing_secret fetches the secret to sign.
Specs
fetch_verifying_secret( module(), token_headers :: map(), opts :: Guardian.options() ) :: {:ok, term()} | {:error, :secret_not_found}
Fetches the secret to verify a token.
It is provided with the tokens headers in order to lookup the secret.