authex v0.1.2 Authex.Verification View Source
Link to this section Summary
Functions
Creates a new Authex.Verification struct from the compact token and options
Link to this section Types
Link to this type
t()
View Source
t() :: %Authex.Verification{alg: integer(), blacklist: binary(), compact: binary(), jwk: integer(), time: integer()}
Link to this section Functions
Link to this function
new(compact, options \\ [])
View Source
new(binary(), list()) :: Authex.Verification.t()
Creates a new Authex.Verification struct from the compact token and options.
Parameters
- compact: A binary compact token.
- options: A keyword list of options.
Options
:time
- the base time (timestamp format) in which to use.:secret
- the secret to verify the token with.:alg
- the algorithm to verify the token with.:blacklist
- the blacklist module to check the jti claim with.
Examples
iex> verification = Authex.Verification.new("token")
iex> with %Authex.Verification{compact: compact} <- verification, do: compact
"token"