Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Cache
indextrue
refresh100d
showRefreshtrue
iddoc
titleRefresh page
showDatetrue
retryEnable

sWordListservoy sReturnTypes2100%height: 30px;2Supported ClientssWordListSmartClientWebClientsWordListNGClient

servoy sSummary12%30%58%height: 30px;3Methods SummaryBuilder to create a new Algorithm instance using SHA256withECDSA.Builder to create a new Algorithm instance using SHA256withECDSA.Builder to create a new Algorithm instance using SHA256withECDSA.Builder to create a new Algorithm instance using SHA256withECDSA.Builder to create a new Algorithm instance using SHA384withECDSA.Builder to create a new Algorithm instance using SHA384withECDSA.Builder to create a new Algorithm instance using SHA384withECDSA.Builder to create a new Algorithm instance using SHA384withECDSA.Builder to create a new Algorithm instance using SHA512withECDSA.Builder to create a new Algorithm instance using SHA512withECDSA.Builder to create a new Algorithm instance using SHA512withECDSA.Builder to create a new Algorithm instance using SHA512withECDSA.Create a new Algorithm instance using HmacSHA256.Create a new HmacSHA256 Algorithm using the specified password.Create a new Algorithm instance using HmacSHA384.Create a new HmacSHA384 Algorithm using the specified password.Create a new Algorithm instance using HmacSHA512.Create a new Algorithm instance using HmacSHA512.Builder to create an algorithm instance based on a Json Web Key Set (JWKS) url.Builder to create a new Algorithm instance using SHA256withRSA.Builder to create a new Algorithm instance using SHA256withRSA.Builder to create a new Algorithm instance using SHA256withRSA.Builder to create a new Algorithm instance using SHA256withRSA.Builder to create a new Algorithm instance using SHA384withRSA.Builder to create a new Algorithm instance using SHA384withRSA.Builder to create a new Algorithm instance using SHA384withRSA.Builder to create a new Algorithm instance using SHA384withRSA.Builder to create a new Algorithm instance using SHA512withRSA.Builder to create a new Algorithm instance using SHA512withRSA.Builder to create a new Algorithm instance using SHA512withRSA.Builder to create a new Algorithm instance using SHA512withRSA.Returns a JSON Web Token token builder.Create 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 HS256 algorithm and the (shared) secret key 'jwt.Verifiy a token that is created with the #create(Object) methodVerify a JSON Web Token with the HS256 algorithm and the (shared) secret key 'jwt.Verify a JSON Web Token with a specific algorithm.

functionservoy sDetail2100%height:30px2Methods DetailsES256name

ES256(publicKey)

dessIndent
Builder to create a new Algorithm instance using SHA256withECDSA. Tokens specify this as "ES256".
prs

Parameters

sIndentpublicKeya byte array representing the publicKey (mostly used to verify tokens)
ret

Returns

sIndent an algorithm builder used to sign or verify JSON Web Tokens.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRowES256name

ES256(publicKey, privateKey)

dessIndent
Builder to create a new Algorithm instance using SHA256withECDSA. Tokens specify this as "ES256".
prs

Parameters

sIndentpublicKeya byte array representing the publicKey (mostly used to verify tokens)privateKeya byte array representing the privateKey (mostly used to create tokens)
ret

Returns

sIndent an algorithm used to sign or verify JSON Web Tokens.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
ES256name

ES256(publicKey)

dessIndent
Builder to create a new Algorithm instance using SHA256withECDSA. Tokens specify this as "ES256".
prs

Parameters

sIndentpublicKeya String representing the publicKey (mostly used to verify tokens)
ret

Returns

sIndent an algorithm builder used to sign or verify JSON Web Tokens.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
ES256name

ES256(publicKey, privateKey)

dessIndent
Builder to create a new Algorithm instance using SHA256withECDSA. Tokens specify this as "ES256".
prs

Parameters

sIndentpublicKeya String representing the publicKey (mostly used to verify tokens)privateKeya String representing the privateKey (mostly used to create tokens)
ret

Returns

sIndent an algorithm used to sign or verify JSON Web Tokens.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
ES384name

ES384(publicKey)

dessIndent
Builder to create a new Algorithm instance using SHA384withECDSA. Tokens specify this as "ES384".
prs

Parameters

sIndentpublicKeya byte array representing the publicKey (mostly used to verify tokens)
ret

Returns

sIndent an algorithm builder used to sign or verify JSON Web Tokens.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
ES384name

ES384(publicKey, privateKey)

dessIndent
Builder to create a new Algorithm instance using SHA384withECDSA. Tokens specify this as "ES384".
prs

Parameters

sIndentpublicKeya byte array representing the publicKey (mostly used to verify tokens)privateKeya byte array representing the privateKey (mostly used to create tokens)
ret

Returns

sIndent an algorithm used to sign or verify JSON Web Tokens.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
ES384name

ES384(publicKey)

dessIndent
Builder to create a new Algorithm instance using SHA384withECDSA. Tokens specify this as "ES384".
prs

Parameters

sIndentpublicKeya String representing the publicKey (mostly used to verify tokens)
ret

Returns

sIndent an algorithm builder used to sign or verify JSON Web Tokens.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
ES384name

ES384(publicKey, privateKey)

dessIndent
Builder to create a new Algorithm instance using SHA384withECDSA. Tokens specify this as "ES384".
prs

Parameters

sIndentpublicKeya String representing the publicKey (mostly used to verify tokens)privateKeya String representing the privateKey (mostly used to create tokens)
ret

Returns

sIndent an algorithm used to sign or verify JSON Web Tokens.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
ES512name

ES512(publicKey)

dessIndent
Builder to create a new Algorithm instance using SHA512withECDSA. Tokens specify this as "ES512".
prs

Parameters

sIndentpublicKeya byte array representing the publicKey (mostly used to verify tokens)
ret

Returns

sIndent an algorithm builder used to sign or verify JSON Web Tokens.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
ES512name

ES512(publicKey, privateKey)

dessIndent
Builder to create a new Algorithm instance using SHA512withECDSA. Tokens specify this as "ES512".
prs

Parameters

sIndentpublicKeya byte array representing the publicKey (mostly used to verify tokens)privateKeya byte array representing the privateKey (mostly used to create tokens)
ret

Returns

sIndent an algorithm used to sign or verify JSON Web Tokens.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
ES512name

ES512(publicKey)

dessIndent
Builder to create a new Algorithm instance using SHA512withECDSA. Tokens specify this as "ES512".
prs

Parameters

sIndentpublicKeya String representing the publicKey
ret

Returns

sIndent an algorithm builder used to sign or verify JSON Web Tokens.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
ES512name

ES512(publicKey, privateKey)

dessIndent
Builder to create a new Algorithm instance using SHA512withECDSA. Tokens specify this as "ES512".
prs

Parameters

sIndentpublicKeya String representing the publicKey (mostly used to verify tokens)privateKeya String representing the privateKey (mostly used to create tokens)
ret

Returns

sIndent an algorithm used to sign or verify JSON Web Tokens.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
HS256name

HS256()

dessIndent
Create a new Algorithm instance using HmacSHA256. Tokens specify this as "HS256".
The password used to configure the algorithm is the (shared) secret key 'jwt.secret.password' that has to be configured on the admin page for this plugin.
ret

Returns

sIndent an algorithm used to sign or verify JSON Web Tokens.
clients

Supported Clients

sIndentWebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
HS256name

HS256(password)

dessIndent
Create a new HmacSHA256 Algorithm using the specified password. Tokens specify this as "HS256".
prs

Parameters

sIndentpasswordthe secret used to encrypt and decrypt the tokens
ret

Returns

sIndent an algorithm used to sign or verify JSON Web Tokens.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
HS384name

HS384()

dessIndent
Create a new Algorithm instance using HmacSHA384. Tokens specify this as "HS384".
The password used to configure the algorithm is the (shared) secret key 'jwt.secret.password' that has to be configured on the admin page for this plugin.
ret

Returns

sIndent an algorithm used to sign or verify JSON Web Tokens.
clients

Supported Clients

sIndentWebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
HS384name

HS384(password)

dessIndent
Create a new HmacSHA384 Algorithm using the specified password. Tokens specify this as "HS384".
prs

Parameters

sIndentpasswordthe secret used to encrypt and decrypt the tokens
ret

Returns

sIndent an algorithm used to sign or verify JSON Web Tokens.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
HS512name

HS512()

dessIndent
Create a new Algorithm instance using HmacSHA512. Tokens specify this as "HS512".
The password used to configure the algorithm is the (shared) secret key 'jwt.secret.password' that has to be configured on the admin page for this plugin.
ret

Returns

sIndent an algorithm used to sign or verify JSON Web Tokens.
clients

Supported Clients

sIndentWebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
HS512name

HS512(password)

dessIndent
Create a new Algorithm instance using HmacSHA512. Tokens specify this as "HS512".
prs

Parameters

sIndentpasswordthe secret used to encrypt and decrypt the tokens
ret

Returns

sIndent an algorithm used to sign or verify JSON Web Tokens.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
JWKname

JWK(url)

dessIndent
Builder to create an algorithm instance based on a Json Web Key Set (JWKS) url.
Please note that the returned algorithm can only be used to verify tokens.
prs

Parameters

sIndenturlthe jwks url
ret

Returns

sIndent an algorithm which can only be used to VERIFY Json Web Tokens.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
RSA256name

RSA256(publicKey)

dessIndent
Builder to create a new Algorithm instance using SHA256withRSA. Tokens specify this as "RS256".
prs

Parameters

sIndentpublicKeya byte array representing the publicKey (mostly used to verify tokens)
ret

Returns

sIndent an algorithm used to sign or verify Json Web Tokens.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
RSA256name

RSA256(publicKey, privateKey)

dessIndent
Builder to create a new Algorithm instance using SHA256withRSA. Tokens specify this as "RS256".
prs

Parameters

sIndentpublicKeya byte array representing the publicKey (mostly used to verify tokens)privateKeya byte array representing the privateKey (mostly used to create tokens)
ret

Returns

sIndent an algorithm used to sign or verify Json Web Tokens.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
RSA256name

RSA256(publicKey)

dessIndent
Builder to create a new Algorithm instance using SHA256withRSA. Tokens specify this as "RS256".
prs

Parameters

sIndentpublicKeya String representing the publicKey (mostly used to verify tokens)
ret

Returns

sIndent an algorithm used to sign or verify Json Web Tokens.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
RSA256name

RSA256(publicKey, privateKey)

dessIndent
Builder to create a new Algorithm instance using SHA256withRSA. Tokens specify this as "RS256".
prs

Parameters

sIndentpublicKeya String representing the publicKey (mostly used to verify tokens)privateKeya String representing the privateKey (mostly used to create tokens)
ret

Returns

sIndent an algorithm used to sign or verify Json Web Tokens.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
RSA384name

RSA384(publicKey)

dessIndent
Builder to create a new Algorithm instance using SHA384withRSA. Tokens specify this as "RS384".
prs

Parameters

sIndentpublicKeya byte array representing the publicKey (mostly used to verify tokens)
ret

Returns

sIndent an algorithm used to sign or verify JSON Web Tokens.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
RSA384name

RSA384(publicKey, privateKey)

dessIndent
Builder to create a new Algorithm instance using SHA384withRSA. Tokens specify this as "RS384".
prs

Parameters

sIndentpublicKeya byte array representing the publicKey (mostly used to verify tokens)privateKeya byte array representing the privateKey (mostly used to create tokens)
ret

Returns

sIndent an algorithm used to sign or verify JSON Web Tokens.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
RSA384name

RSA384(publicKey)

dessIndent
Builder to create a new Algorithm instance using SHA384withRSA. Tokens specify this as "RS384".
prs

Parameters

sIndentpublicKeya String representing the publicKey (mostly used to verify tokens)
ret

Returns

sIndent an algorithm used to sign or verify JSON Web Tokens.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
RSA384name

RSA384(publicKey, privateKey)

dessIndent
Builder to create a new Algorithm instance using SHA384withRSA. Tokens specify this as "RS384".
prs

Parameters

sIndentpublicKeya String representing the publicKey (mostly used to verify tokens)privateKeya String representing the privateKey (mostly used to create tokens)
ret

Returns

sIndent an algorithm used to sign or verify JSON Web Tokens.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
RSA512name

RSA512(publicKey)

dessIndent
Builder to create a new Algorithm instance using SHA512withRSA. Tokens specify this as "RS512".
prs

Parameters

sIndentpublicKeya byte array representing the publicKey (mostly used to verify tokens)
ret

Returns

sIndent an algorithm used to sign or verify JSON Web Tokens.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
RSA512name

RSA512(publicKey, privateKey)

dessIndent
Builder to create a new Algorithm instance using SHA512withRSA. Tokens specify this as "RS512".
prs

Parameters

sIndentpublicKeya byte array representing the publicKey (mostly used to verify tokens)privateKeya byte array representing the privateKey (mostly used to create tokens)
ret

Returns

sIndent an algorithm used to sign or verify JSON Web Tokens.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
RSA512name

RSA512(publicKey)

dessIndent
Builder to create a new Algorithm instance using SHA512withRSA. Tokens specify this as "RS512".
prs

Parameters

sIndentpublicKeya String representing the publicKey (mostly used to verify tokens)
ret

Returns

sIndent an algorithm used to sign or verify JSON Web Tokens.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
RSA512name

RSA512(publicKey, privateKey)

dessIndent
Builder to create a new Algorithm instance using SHA512withRSA. Tokens specify this as "RS512".
prs

Parameters

sIndentpublicKeya String representing the publicKey (mostly used to verify tokens)privateKeya String representing the privateKey (mostly used to create tokens)
ret

Returns

sIndent an algorithm used to sign or verify JSON Web Tokens.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
buildername

builder()

dessIndent
Returns a JSON Web Token token builder.
ret

Returns

sIndent an object which creates a jwt token.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
createname

create(payload)

dessIndent
Create a JSON Web Token for the given payload that is signed with the (shared) secret key 'jwt.secret.password'.
The 'jwt.secret.password' plugin 
that
property 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.
This is a shorthand method of the #builder() method with a HS256 algorithm.
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 generated
clients

Supported Clients

sIndent
SmartClient,WebClient,NGClientsam

Sample

sIdentjavascript
lastDetailRow
createname

create(payload, expiresAt)

dessIndent
Create a JSON Web Token for the given payload that is signed with the HS256 algorithm and the (shared) secret key 'jwt.secret.password'.
The 'jwt.secret.password' plugin 
that
property 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.
This is a shorthand method of the #builder() method with a HS256 algorithm.
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 verified
ret

Returns

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

Supported Clients

sIndent
SmartClient,WebClient,NGClientsam

Sample

sIdentjavascript
lastDetailRow
verifyname

verify(token)

dessIndent
Verifiy
Verify a
token that is created with
 JSON Web Token with the HS256 algorithm and the 
#create
(
Object
shared)
method
 secret key 'jwt.secret.password'.
The 'jwt.secret.password' plugin property has to be configured on the admin page.
This will only verify and return the payload that was given if the token 
could
was 
be verified
created with the HS256 
(shared)
algorithm 
secrect
and 
key
the 'jwt.secret.password'.
Will also return null if the token passed its expire date.
prs

Parameters

sIndenttokena JSON Web Token
ret

Returns

sIndent the payload or null if the token can't be verified
clients

Supported Clients

sIndentWebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
verifyname

verify(token, algorithm)

dessIndent
Verify a JSON Web Token with a specific algorithm.
The token could be external or created with the #builder() method.

This will only verify and return the payload that
is configured on
 was given if the token could be verified with the 
admin
provided 
page
algorithm.
Will also return null if the token passed its expire date.
prs

Parameters

sIndenttokena JSON Web Tokenalgorithman algorithm used to verify the signature
ret

Returns

sIndent the payload or null if the token can't be verified
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow