May 01, 2024 20:28 Parameters Returns Supported Clients Sample Parameters Returns Supported Clients Sample Parameters Returns Supported Clients SampleSupported Clients
SmartClient
WebClient
NGClient
Methods Summary
String
create(payload)
Create a JSON Web Token for the given payload that is signed with the (shared) secret key 'jwt.
String
create(payload, expiresAt)
Create a JSON Web Token for the given payload that is signed with the (shared) secret key 'jwt.
Object
verify(token)
Verifiy a JWT.
Methods Details
create(payload)
Create a JSON Web Token for the given payload that is signed with the (shared) secret key 'jwt.secret.password' that has to be configured on the admin page for this plugin.
The payload can be for example a user:username of the current user, so that with this token if it verifies with the same secret key you can assume it is the same user that wants to login.
Object
payload
a json containing the data,
e.g. {'some': 'data', 'somemore': 'data2'}
create(payload, expiresAt)
Create a JSON Web Token for the given payload that is signed with the (shared) secret key 'jwt.secret.password' that has to be configured on the admin page for this plugin.
The payload can be for example a user:username of the current user, so that with this token if it verifies with the same secret key you can assume it is the same user that wants to login.
The expiresAt makes sure this token is only valid until that date.
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
verify(token)
Verifiy a JWT.
String
token
a JSON Web Token