KittenBlue.JWS.DPoP (kitten_blue v0.9.1)

This module is a helper module that supports the generation and verification of DPoP Proof JWT as defined in RFC9449.

Link to this section Summary

Functions

Function to return the private key for a given algorithm

Function to create DPoP Proof JWT

Function to verify DPoP Proof JWT's payload and signature

Link to this section Functions

Link to this function

generate_private_key(opts \\ [])

Specs

generate_private_key(opts :: Keyword.t()) ::
  {:ok, jwk :: KittenBlue.JWK} | {:error, term()}

Function to return the private key for a given algorithm

NOTE: move to KittenBlue.JWK

Link to this function

issue_dpop_proof_jwt(payload, jwk)

Specs

issue_dpop_proof_jwt(payload :: map(), jwk :: KittenBlue.JWK.t()) ::
  {:ok, jwt :: String.t()} | {:error, term()}

Function to create DPoP Proof JWT

ref. https://datatracker.ietf.org/doc/html/rfc9449#section-4.2

Link to this function

verify_dpop_proof_jwt(jwt)

Specs

verify_dpop_proof_jwt(jwt :: String.t()) ::
  {:ok, header :: map(), payload :: map(), jwk :: KittenBlue.JWK.t()}
  | {:error, term()}

Function to verify DPoP Proof JWT's payload and signature

ref. https://datatracker.ietf.org/doc/html/rfc9449#section-4.3