Header menu logo FSharp.ATProto

DPoP Module

DPoP (Demonstration of Proof-of-Possession) proof generation. Creates JWT proofs that bind access tokens to a specific key pair, as specified in RFC 9449.

Functions and values

Function or value Description

createProof key httpMethod targetUri accessTokenHash nonce

Full Usage: createProof key httpMethod targetUri accessTokenHash nonce

Parameters:
    key : ECDsa
    httpMethod : string
    targetUri : string
    accessTokenHash : string option
    nonce : string option

Returns: string

Create a DPoP proof JWT for a request. The proof binds the request to the key pair and optionally to an access token.

key : ECDsa
httpMethod : string
targetUri : string
accessTokenHash : string option
nonce : string option
Returns: string

generateKeyPair ()

Full Usage: generateKeyPair ()

Parameters:
    () : unit

Returns: ECDsa

Generate a new ES256 key pair for DPoP.

() : unit
Returns: ECDsa

generatePkce ()

Full Usage: generatePkce ()

Parameters:
    () : unit

Returns: PkceChallenge

Generate PKCE code verifier and S256 challenge (RFC 7636).

() : unit
Returns: PkceChallenge

hashAccessToken accessToken

Full Usage: hashAccessToken accessToken

Parameters:
    accessToken : string

Returns: string

Compute the base64url-encoded SHA-256 hash of an access token, for use in the "ath" claim of a DPoP proof.

accessToken : string
Returns: string

Type something to start searching.