Jwt
Recurso de geração de JSON Web Tokens.
algorithmES
_jwt.algorithmES(bits: int) : io.jsonwebtoken.security.SignatureAlgorithm
Description
Gets the type of algorithm for signing of type ECDSA.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
bits | int | Number 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
NAME | TYPE | DESCRIPTION |
---|---|---|
bits | int | Number 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
NAME | TYPE | DESCRIPTION |
---|---|---|
bits | int | Number 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
NAME | TYPE | DESCRIPTION |
---|---|---|
bits | int | Number 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
NAME | TYPE | DESCRIPTION |
---|---|---|
token | string |
Return
( Values )
decode
_jwt.decode(token: string) : Values
Description
Encodes the values of the header and body inserted.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
token | string | Acess 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
NAME | TYPE | DESCRIPTION |
---|---|---|
enabled | boolean |
Return
( JWT )
encode
_jwt.encode(body: Values) : string
Description
Encodes the body value inserted.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
body | Values | Body 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
NAME | TYPE | DESCRIPTION |
---|---|---|
header | Values | Header value. |
body | Values | Body value. |
Return
( string )
Returns the values encoded.
getHMACKeyFromSecret
_jwt.getHMACKeyFromSecret(secret: string) : javax.crypto.SecretKey
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
secret | string |
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
NAME | TYPE | DESCRIPTION |
---|---|---|
secret | string |
Return
( JWT )
_jwt.init(key: javax.crypto.SecretKey) : JWT
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
key | javax.crypto.SecretKey |
Return
( JWT )
isEnabled
_jwt.isEnabled() : boolean
Return
( boolean )
key
_jwt.key() : javax.crypto.SecretKey
Return
( javax.crypto.SecretKey )
_jwt.key(key: javax.crypto.SecretKey) : JWT
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
key | javax.crypto.SecretKey |
Return
( JWT )
setEnabled
_jwt.setEnabled(enabled: boolean) : JWT
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
enabled | boolean |
Return
( JWT )
setHMACKeyFromSecret
_jwt.setHMACKeyFromSecret(secret: string) : JWT
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
secret | string |
Return
( JWT )
setKey
_jwt.setKey(key: javax.crypto.SecretKey) : JWT
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
key | javax.crypto.SecretKey |
Return
( JWT )
token
_jwt.token(Values: Values) : string
Description
Generates a token through jwtBuilder.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
Values | Values | Values for the jwtBuilder. |
Return
( string )
Returns the generation.