authex v0.2.1 Authex.Signer View Source

Link to this section Summary

Functions

Creates a new binary compact token from the Authex.Signer and Authex.Token structs

Creates a new Authex.Signer struct from the options

Link to this section Types

Link to this type option() View Source
option() :: {:secret, binary()} | {:alg, atom()}
Link to this type options() View Source
options() :: [option()]
Link to this type t() View Source
t() :: %Authex.Signer{jwk: integer(), jws: integer()}

Link to this section Functions

Link to this function compact(signer, token) View Source
compact(signer :: Authex.Signer.t(), token :: Authex.Token.t()) :: Authex.Token.compact()

Creates a new binary compact token from the Authex.Signer and Authex.Token structs.

Parameters

Link to this function new(auth, opts \\ []) View Source
new(auth :: Authex.t(), options :: options()) :: t()

Creates a new Authex.Signer struct from the options.

Parameters

  • auth: An Authex module.
  • options: A keyword list of options.

Options

  • :secret - the secret to sign the token with.
  • :alg - the algorithm to sign the token with.