Skip to main content

JWT

Handling JSON Web Tokens.


algorithmES​


_jwt.algorithmES(bits: int) : io.jsonwebtoken.security.SignatureAlgorithm​

Description​

Gets the type of algorithm for signing of type ECDSA.

Attributes​
NAMETYPEDESCRIPTION
bitsintNumber of bits in the signature algorithm, it can be 256, 384 or 512.
Return​

( io.jsonwebtoken.security.SignatureAlgorithm )

Returns the signature algorithm type object.


algorithmHS​


_jwt.algorithmHS(bits: int) : io.jsonwebtoken.security.MacAlgorithm​

Description​

Gets the type of algorithm for signing of type HMAC.

Attributes​
NAMETYPEDESCRIPTION
bitsintNumber of bits in the signature algorithm, it can be 256, 384 or 512.
Return​

( io.jsonwebtoken.security.MacAlgorithm )

Returns the signature algorithm type object.


algorithmPS​


_jwt.algorithmPS(bits: int) : io.jsonwebtoken.security.SignatureAlgorithm​

Description​

Gets the type of algorithm for signing of type RSASS and MGF1.

Attributes​
NAMETYPEDESCRIPTION
bitsintNumber of bits in the signature algorithm, it can be 256, 384 or 512.
Return​

( io.jsonwebtoken.security.SignatureAlgorithm )

Returns the signature algorithm type object.


algorithmRS​


_jwt.algorithmRS(bits: int) : io.jsonwebtoken.security.SignatureAlgorithm​

Description​

Gets the type of algorithm for signing of type RSASSA-PKCS1-v1_5.

Attributes​
NAMETYPEDESCRIPTION
bitsintNumber of bits in the signature algorithm, it can be 256, 384 or 512.
Return​

( io.jsonwebtoken.security.SignatureAlgorithm )

Returns the signature algorithm type object.


data​


_jwt.data(token: string) : Values​

Attributes​
NAMETYPEDESCRIPTION
tokenstring
Return​

( Values )


decode​


_jwt.decode(token: string) : Values​

Description​

Encodes the values of the header and body inserted.

Attributes​
NAMETYPEDESCRIPTION
tokenstringAcess code.
Return​

( Values )

Returns the values decoded.


enabled​


_jwt.enabled() : boolean​

Description​

Verify if the JWT is enable.

Return​

( boolean )

Returns if is enabled.


_jwt.enabled(enabled: boolean) : JWT​

Attributes​
NAMETYPEDESCRIPTION
enabledboolean
Return​

( JWT )


encode​


_jwt.encode(body: Values) : string​

Description​

Encodes the body value inserted.

Attributes​
NAMETYPEDESCRIPTION
bodyValuesBody value.
Return​

( string )

Returns the value enconded.


_jwt.encode(header: Values, body: Values) : string​

Description​

Encodes the values of the header and body inserted.

Attributes​
NAMETYPEDESCRIPTION
headerValuesHeader value.
bodyValuesBody value.
Return​

( string )

Returns the values encoded.


getHMACKeyFromSecret​


_jwt.getHMACKeyFromSecret(secret: string) : javax.crypto.SecretKey​

Attributes​
NAMETYPEDESCRIPTION
secretstring
Return​

( javax.crypto.SecretKey )


getKey​


_jwt.getKey() : javax.crypto.SecretKey​

Return​

( javax.crypto.SecretKey )


init​


_jwt.init() : JWT​

Return​

( JWT )


_jwt.init(secret: string) : JWT​

Attributes​
NAMETYPEDESCRIPTION
secretstring
Return​

( JWT )


_jwt.init(key: javax.crypto.SecretKey) : JWT​

Attributes​
NAMETYPEDESCRIPTION
keyjavax.crypto.SecretKey
Return​

( JWT )


isEnabled​


_jwt.isEnabled() : boolean​

Description​

Verify if the JWT is enable.

Return​

( boolean )

Returns if is enabled.


key​


_jwt.key() : javax.crypto.SecretKey​

Return​

( javax.crypto.SecretKey )


_jwt.key(key: javax.crypto.SecretKey) : JWT​

Attributes​
NAMETYPEDESCRIPTION
keyjavax.crypto.SecretKey
Return​

( JWT )


setEnabled​


_jwt.setEnabled(enabled: boolean) : JWT​

Attributes​
NAMETYPEDESCRIPTION
enabledboolean
Return​

( JWT )


setHMACKeyFromSecret​


_jwt.setHMACKeyFromSecret(secret: string) : JWT​

Attributes​
NAMETYPEDESCRIPTION
secretstring
Return​

( JWT )


setKey​


_jwt.setKey(key: javax.crypto.SecretKey) : JWT​

Attributes​
NAMETYPEDESCRIPTION
keyjavax.crypto.SecretKey
Return​

( JWT )


token​


_jwt.token(Values: Values) : string​

Description​

Generates a token through jwtBuilder.

Attributes​
NAMETYPEDESCRIPTION
ValuesValuesValues for the jwtBuilder.
Return​

( string )

Returns the generation.