servoy sReturnTypes2100%height: 30px;2Supported ClientssWordListSmartClientsWordListWebClientsWordListNGClientservoy sSummary12%30%58%height: 30px;3Methods SummaryCreate a JSON Web Token for the given payload that is signed with the (shared) secret key 'jwt.Create a JSON Web Token for the given payload that is signed with the (shared) secret key 'jwt.Verifiy a JWT.functionservoy sDetail2100%height:30px2Methods Detailscreatename
create(payload)
dessIndent
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.
prs
Parameters
sIndentpayloada json containing the data, e.g. {'some': 'data', 'somemore': 'data2'}ret
Returns
sIndent a string representing the encrypted data or null if the token cannot be generatedclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowcreatename
create(payload, expiresAt)
dessIndent
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.
prs
Parameters
sIndentpayloada json containing the data, e.g. {'some': 'data', 'somemore': 'data2'}expiresAtthe date when the created token expires, after the expired date the token won't be verifiedret
Returns
sIndent a string representing the encrypted data or null if the token cannot be generatedclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowverifyname
verify(token)
dessIndent
Verifiy a JWT.
prs
Parameters
sIndenttokena JSON Web Tokenret
Returns
sIndent the payload or null if the token can't be verifiedclients