TokenSigner Module
Access token JWT creation and signing.
Functions and values
| Function or value |
Description
|
Full Usage:
createAccessToken config sub clientId scope dpopJkt issuedAt
Parameters:
OAuthServerConfig
sub : Did
clientId : string
scope : string
dpopJkt : string
issuedAt : DateTimeOffset
Returns: string
|
Create a signed access token JWT (at+jwt). Returns a compact JWS string (header.payload.signature).
|
Full Usage:
createRefreshToken ()
Parameters:
unit
Returns: string
|
Generate an opaque refresh token (cryptographically random string).
|
|
|
|
|
|
Export the public key of an ECDsa key pair as a JWK JSON string. Includes kty, crv, x, y, kid (JWK thumbprint), use, and alg fields.
|
|
Create a signing function from an ECDsa key. Signs data with SHA-256 and returns the signature bytes.
|
Full Usage:
parseAccessTokenKid jwt
Parameters:
string
Returns: string option
|
Extract the kid from an access token JWT header without verifying signature. Returns None if the token is malformed or the kid field is missing.
|