View Source Guardian.Token.Jwt.SecretFetcher behaviour (Guardian v2.3.2)
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
@callback fetch_signing_secret(module(), opts :: Guardian.options()) :: {:ok, term()} | {:error, :secret_not_found}
fetch_signing_secret fetches the secret to sign.
@callback 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.