View Source Flowy.Utils.JwtToken.Context (Flowy v0.1.1)

This module is responsible for decoding and verifying a JWT token

Summary

Functions

Builds a context struct with the token and the claims

Compares the audience from the token with the audience to validate

Types

@type t() :: %Flowy.Utils.JwtToken.Context{
  claims: [Joken.Claim.t()],
  token: String.t()
}

Functions

Link to this function

build(token, opts \\ [])

View Source
@spec build(
  any(),
  keyword()
) :: %Flowy.Utils.JwtToken.Context{claims: [Joken.Claim.t()], token: String.t()}

Builds a context struct with the token and the claims

Link to this function

default_claims(defaults \\ [])

View Source

See Joken.Config.default_claims/1.

@spec validate_audience(any()) :: false
Link to this function

validate_audience(aud_from_token, aud_to_validate)

View Source
@spec validate_audience(String.t(), maybe_improper_list()) :: boolean()

Compares the audience from the token with the audience to validate