mirror of
https://github.com/hanzoai/jose.git
synced 2026-09-24 17:00:01 +00:00
1.9 KiB
1.9 KiB
Interface: GetKeyFunction<IProtectedHeader, IToken>
💗 Help the project
Support from the community to continue maintaining and improving this module is welcome. If you find the module useful, please consider supporting the project by becoming a sponsor.
Generic Interface for consuming operations dynamic key resolution.
Type parameters
| Name | Description |
|---|---|
IProtectedHeader |
Type definition of the JWE or JWS Protected Header. |
IToken |
Type definition of the consumed JWE or JWS token. |
Callable
GetKeyFunction
â–¸ GetKeyFunction(protectedHeader, token): Uint8Array | KeyLike | Promise<Uint8Array | KeyLike>
Dynamic key resolution function. No token components have been verified at the time of this function call.
If you cannot match a key suitable for the token, throw an error instead.
Parameters
| Name | Type | Description |
|---|---|---|
protectedHeader |
IProtectedHeader |
JWE or JWS Protected Header. |
token |
IToken |
The consumed JWE or JWS token. |
Returns
Uint8Array | KeyLike | Promise<Uint8Array | KeyLike>