validateJwks
validateJwks
Validates already parsed, plain JSON data and owns a detached deep snapshot of it.
Prefer parseJwks for untrusted transport text: an object cannot reveal lost duplicate member names or invalid original UTF-8. No getters or toJSON are called. Cycles, non-JSON values, sparse arrays, accessors, symbols and custom prototypes are refused. maxBytes bounds the UTF-8 size of the compact JSON data spelling, not the original transport bytes. Depth and node limits match the text parser. A changed source object requires a new validation and resolver instance.
ts
function validateJwks(
value: unknown,
limits?: Partial<JwksLimits>,
): JoseResult<Jwks, ParseJwksErrorCode>Parameters
value:unknownlimits?:Partial<JwksLimits>