Package org.ctan.site.services.account
Class JwtManager
java.lang.Object
org.ctan.site.services.account.JwtManager
The class
JwtManager
contains static utility methods for dealing
with JWTs.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final com.auth0.jwt.interfaces.JWTVerifier
The fieldVERIFIER
contains the verifier. -
Method Summary
-
Field Details
-
VERIFIER
protected static final com.auth0.jwt.interfaces.JWTVerifier VERIFIERThe fieldVERIFIER
contains the verifier. It is visible outside for testing purpose.
-
-
Method Details
-
create
Create a JWT with standard options set.- Parameters:
account
- the user id;- Returns:
- a new JWT
-
verify
The methodverify
provides means to verify a JWT and return the account.- Parameters:
token
- the JWT- Returns:
- the verified user id or
null
-