View Source Flowy.Utils.JwtToken (Flowy v0.1.1)
This module is responsible for decoding and verifying a JWT token
Summary
Functions
Decodes and verifies a JWT token using the public keys found in the JWKS endpoint
Fetches the public keys from the JWKS endpoint
Signs a JWT token using the private key found in the PEM file This is mainly used to generate a token for testing purposes
Signs a JWT token using the private key found in the PEM file
Functions
@spec decode( Flowy.Utils.JwtToken.Context.t(), keyword() ) :: {:error, String.t()} | {:ok, map()}
@spec decode_and_validate( Flowy.Utils.JwtToken.Context.t(), keyword() ) :: {:error, String.t()} | {:ok, map()}
Decodes and verifies a JWT token using the public keys found in the JWKS endpoint
Fetches the public keys from the JWKS endpoint
Signs a JWT token using the private key found in the PEM file This is mainly used to generate a token for testing purposes
@spec sign!() :: String.t()
Signs a JWT token using the private key found in the PEM file