RIG.JWT.Claims (Reactive Interaction Gateway v3.0.0-alpha.2) View Source

Read JSON Web Tokens.

Link to this section Summary

Functions

Encode a signed JWT that wraps the given claims.

Obtain JWT claims by parsing and validating a token.

Link to this section Types

Specs

claims() :: %{optional(String.t()) => String.t()}

Specs

jwt_conf() :: %{alg: String.t(), key: String.t()}

Specs

token() :: String.t()

Link to this section Functions

Link to this function

encode(claims, jwt_conf)

View Source

Specs

encode(claims(), jwt_conf()) :: token()

Encode a signed JWT that wraps the given claims.

Specs

from(token(), jwt_conf()) :: {:ok, claims()} | {:error, String.t()}

Obtain JWT claims by parsing and validating a token.