Connectum API Reference / @connectum/auth / testing / createTestJwtRS256
Function: createTestJwtRS256() ​
createTestJwtRS256(
privateKey,payload,options):Promise<string>
Defined in: packages/auth/src/testing/test-jwt-rs256.ts:133
Mint an RS256 test JWT signed by the private key from generateRsaTestKeypair, with a kid header matching the published JWK.
NOT for production use.
Parameters ​
privateKey ​
CryptoKey
Private key from generateRsaTestKeypair.
payload ​
Record<string, unknown>
JWT claims (e.g. sub, roles, scope).
options ​
kid (required, must match the published JWK) plus optional issuer/audience/expiresIn (default "1h").
audience? ​
string
expiresIn? ​
string
issuer? ​
string
kid ​
string
Returns ​
Promise<string>