jose/docs/interfaces/types.getkeyfunction.md
2021-03-15 17:21:54 +01:00

1.6 KiB

Interface: GetKeyFunction<T, T2>

types.GetKeyFunction

Generic Interface for consuming operations dynamic key resolution. 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.

Type parameters

Name
T
T2

Hierarchy

Callable

GetKeyFunction(protectedHeader: T, token: T2): Promise<KeyLike>

Generic Interface for consuming operations dynamic key resolution. 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 T JWE or JWS Protected Header.
token T2 The consumed JWE or JWS token.

Returns: Promise<KeyLike>

Defined in: types.d.ts:79