peek function

Claims peek({
  1. required Uint8List token,
})

Extracts claims from a CWT without verifying the signature.

The claims are unauthenticated and must not be trusted until verified with verify. Use signer to extract the signer's fingerprint for key lookup. The single case for this method is self-signed key discovery.

Throws if the token is malformed or its claims fall outside the supported CBOR subset.

Implementation

Claims peek({required Uint8List token}) =>
    Claims._decode(ffi.cwtPeek(token: token));