signCompactJws
signCompactJws
Signs a compact JWS with an existing private CryptoKey.
The header is alg followed by the optional typ, kid and cty. Throws a ResultError (see isResultError) coded SignJoseErrorCode when the algorithm, key or header input is invalid. Intended for issuing tokens and for building synthetic tokens in tests.
ts
function signCompactJws(
input: SignJwsInput,
): Promise<string>Parameters
input:SignJwsInput