pdk.util.JWT

functions to operate with JSON web tokens

Functions


generateToken

Actually builds the JWT and serializes it to a compact, URL-safe string according to the JWT Compact Serialization rules. HS512 is using to sign.

Arguments:

Result:

Possible exceptions


validateToken

Verify the token belongs to the input JwtUser.

Arguments:

Result:

Possible exceptions


isTokenExpired

Verify the token has been expired.

Arguments:

Result:

Possible exceptions


getUserIdFromToken

Returns the userId attribute from the serialized jwt token.

Arguments:

Result:

Possible exceptions


getUserFromToken

Returns the user as an object from the serialized jwt token.

Arguments:

Result:

Possible exceptions


getExpirationDateFromToken

Returns the expiration date from the serialized jwt token.

Arguments:

Result:

Possible exceptions

Last updated