Packages
joken
1.5.0
2.6.2
2.6.1
2.6.0
2.5.0
2.4.1
2.4.0
2.3.0
2.2.0
2.1.0
2.0.1
2.0.0
2.0.0-rc3
2.0.0-rc2
2.0.0-rc1
2.0.0-rc0
1.5.0
1.4.1
1.4.0
1.3.2
1.3.1
1.3.0
1.2.2
1.2.1
1.2.0
1.1.1
1.1.0
1.0.1
1.0.0
0.16.1
0.16.0
0.15.0
0.14.1
0.14.0
0.13.1
0.13.0
0.12.0
0.11.0
0.10.1
0.10.0
0.8.1
0.8.0
0.7.0
0.6.2
0.6.1
0.6.0
0.5.0
0.1.0
JWT (JSON Web Token) library for Elixir.
Current section
Files
Jump to
Current section
Files
lib/joken/token.ex
defmodule Joken.Token do
alias Joken.Signer
@moduledoc """
This is the data structure that holds the token state.
"""
@type json_module :: module
@type header :: %{binary => any}
@type claims :: %{binary => any}
@type claim_function_map :: %{binary => function}
@type error :: binary
@type errors :: [binary]
@type token :: binary
@type signer :: Signer.t
@type t :: %__MODULE__{
json_module: module,
claims: claims,
claims_generation: claim_function_map,
validations: claim_function_map,
error: error | nil,
errors: errors,
token: token | nil,
signer: signer | nil
}
defstruct [json_module: nil,
header: %{},
claims: %{},
claims_generation: %{},
validations: %{},
error: nil,
errors: [],
token: nil,
signer: nil]
end