Skip to main content
Version: 1.3

Class: Jwt

identity_wasm.Jwt

A wrapper around a JSON Web Token (JWK).

Table of contents

Constructors

Methods

Constructors

constructor

new Jwt(jwt_string)

Creates a new Jwt from the given string.

Parameters

NameType
jwt_stringstring

Methods

toString

toString(): string

Returns a clone of the JWT string.

Returns

string


toJSON

toJSON(): any

Serializes this to a JSON object.

Returns

any


fromJSON

Static fromJSON(json): Jwt

Deserializes an instance from a JSON object.

Parameters

NameType
jsonany

Returns

Jwt


clone

clone(): Jwt

Deep clones the object.

Returns

Jwt