Skip to main content

KeyBindingJwtClaims

@iota/identity-wasm API documentation


Class: KeyBindingJwtClaims

Claims set for key binding JWT.

Constructors​

new KeyBindingJwtClaims()​

new KeyBindingJwtClaims(jwt, disclosures, nonce, aud, issued_at?, custom_properties?): KeyBindingJwtClaims

Creates a new [KeyBindingJwtClaims]. When issued_at is left as None, it will automatically default to the current time.

Error

When issued_at is set to None and the system returns time earlier than SystemTime::UNIX_EPOCH.

Parameters​

jwt​

string

disclosures​

string[]

nonce​

string

aud​

string

issued_at?​

null | Timestamp

custom_properties?​

null | Record<string, any>

Returns​

KeyBindingJwtClaims

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()​

Call Signature​

toString(): string

Return stringified version of self.

Returns​

string

Call Signature​

toString(): string

Returns a string representation of the claims.

Returns​

string


iat()​

iat(): bigint

Returns a copy of the issued at iat property.

Returns​

bigint


aud()​

aud(): string

Returns a copy of the audience aud property.

Returns​

string


nonce()​

nonce(): string

Returns a copy of the nonce property.

Returns​

string


sdHash()​

sdHash(): string

Returns a copy of the sd_hash property.

Returns​

string


customProperties()​

customProperties(): Record<string, any>

Returns a copy of the custom properties.

Returns​

Record<string, any>


keyBindingJwtHeaderTyp()​

static keyBindingJwtHeaderTyp(): string

Returns the value of the typ property of the JWT header according to https://www.ietf.org/archive/id/draft-ietf-oauth-selective-disclosure-jwt-07.html#name-key-binding-jwt

Returns​

string


fromJSON()​

static fromJSON(json): KeyBindingJwtClaims

Deserializes an instance from a JSON object.

Parameters​

json​

any

Returns​

KeyBindingJwtClaims


clone()​

clone(): KeyBindingJwtClaims

Deep clones the object.

Returns​

KeyBindingJwtClaims