KittenBlue.JWT (kitten_blue v0.5.0)

This module provides JWT Claims handling functions.

  • verify_claims : Verify claims in Payload

Link to this section Summary


Claims verification in Payload

Link to this section Functions

Link to this function

verify_claims(payload, valid_claims)


verify_claims(payload :: map(), valid_claims :: map()) ::
  :ok | {:error, :invalid_payload, claim_name :: String.t()}

Claims verification in Payload

This function validates the basic claims defined in RFC7519.

valid_claims = %{iss: "", aud: "your_oidc_client_id", nonce: "12345"}

:ok = KittenBlue.JWT.verify_claims(payload, valid_claims)

This function supports the following claims

  • iss : Check for an exact match.
  • aud : Check for an exact match or list
  • exp : Is greater than specified value
  • nbf : Is less than the specified value