AuthIntroduct.TokenHelper (auth_introduct v0.1.14)
Link to this section Summary
Functions
Combines generate_claims/1
and encode_and_sign/2
Same as generate_and_sign/2
but raises if error
Combines verify/2
and validate/2
Same as verify_and_validate/2
but raises if error
Link to this section Functions
Link to this function
create_signer(secret)
Link to this function
generate_and_sign(extra_claims \\ %{}, key \\ __default_signer__())
@spec generate_and_sign(Joken.claims(), Joken.signer_arg()) :: {:ok, Joken.bearer_token(), Joken.claims()} | {:error, Joken.error_reason()}
Combines generate_claims/1
and encode_and_sign/2
Link to this function
generate_and_sign!(extra_claims \\ %{}, key \\ __default_signer__())
@spec generate_and_sign!(Joken.claims(), Joken.signer_arg()) :: Joken.bearer_token()
Same as generate_and_sign/2
but raises if error
Link to this function
generate_jwt!(claims, secret, aud, iss)
Link to this function
get_jwt_param(jwt_body, key)
Link to this function
get_module(mod)
Link to this function
get_token(headers)
Link to this function
token_config(aud, iss)
Link to this function
verify_and_validate(bearer_token, key \\ __default_signer__(), context \\ %{})
@spec verify_and_validate(Joken.bearer_token(), Joken.signer_arg(), term()) :: {:ok, Joken.claims()} | {:error, Joken.error_reason()}
Combines verify/2
and validate/2
Link to this function
verify_and_validate!(bearer_token, key \\ __default_signer__(), context \\ %{})
@spec verify_and_validate!(Joken.bearer_token(), Joken.signer_arg(), term()) :: Joken.claims()
Same as verify_and_validate/2
but raises if error
Link to this function