Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Refresh page May 01, 2024 15:18

Supported Clients
SmartClient WebClient NGClient

Methods Summary
String create(payload) Create a JSON Web Token
String create(payload, expiresAt) Create a JSON Web Token
Object verify(token) Verifiy a JWT.

Methods Details

create(payload)

Create a JSON Web Token

Parameters

Object payload a json containing the data, e.g. {'some': 'data', 'somemore': 'data2'}

Returns

String a string representing the encrypted data or null if the token cannot be generated

Supported Clients

SmartClient,WebClient,NGClient

Sample

 

create(payload, expiresAt)

Create a JSON Web Token

Parameters

Object payload a json containing the data, e.g. {'some': 'data', 'somemore': 'data2'}
Date expiresAt the date when the created token expires, after the expired date the token won't be verified

Returns

String a string representing the encrypted data or null if the token cannot be generated

Supported Clients

SmartClient,WebClient,NGClient

Sample

 

verify(token)

Verifiy a JWT.

Parameters

String token a JSON Web Token

Returns

Object the payload or null if the token can't be verified

Supported Clients

SmartClient,WebClient,NGClient

Sample

 

  • No labels