Assent v0.1.13 Assent.JWTAdapter behaviour View Source
JWT adapter helper module
Usage
defmodule MyApp.MyJWTAdapter do
@behaviour Assent.JWTAdapter
@impl true
def sign(claims, alg, secret, opts) do
# ...
end
@impl true
def verify(token, secret, opts) do
# ...
end
end
Link to this section Summary
Functions
Loads a private key from the provided configuration
Generates a signed JSON Web Token signature
Verifies the JSON Web Token signature
Link to this section Functions
Link to this function
load_private_key(config)
View Sourceload_private_key(Assent.Config.t()) :: {:ok, binary()} | {:error, term()}
Loads a private key from the provided configuration
Generates a signed JSON Web Token signature
Verifies the JSON Web Token signature