Skip to main content

DecodedJws

@iota/identity-wasm API documentation


Class: DecodedJws

A cryptographically verified decoded token from a JWS.

Contains the decoded headers and the raw claims.

Methods​

toJSON()​

Call Signature​

toJSON(): Object

  • Return copy of self without private attributes.
Returns​

Object

Call Signature​

toJSON(): any

Serializes this to a JSON object.

Returns​

any


toString()​

toString(): string

Return stringified version of self.

Returns​

string


claims()​

claims(): string

Returns a copy of the parsed claims represented as a string.

Errors

An error is thrown if the claims cannot be represented as a string.

This error can only occur if the Token was decoded from a detached payload.

Returns​

string


claimsBytes()​

claimsBytes(): Uint8Array

Return a copy of the parsed claims represented as an array of bytes.

Returns​

Uint8Array


protectedHeader()​

protectedHeader(): JwsHeader

Returns a copy of the protected header.

Returns​

JwsHeader


clone()​

clone(): DecodedJws

Deep clones the object.

Returns​

DecodedJws