public class TokenHandler extends Object
| Constructor and Description |
|---|
TokenHandler(String secret,
DataHandler dh,
int maxSessionLength) |
| Modifier and Type | Method and Description |
|---|---|
String |
createToken(HashMap<String,Object> claims,
int lifetimeInSeconds) |
String |
createToken(String user) |
String |
createToken(String user,
int lifetimeInSeconds) |
int |
getSessionLength() |
String |
renew(String token) |
public TokenHandler(String secret, DataHandler dh, int maxSessionLength)
public String renew(String token) throws TokenHandlerException
TokenHandlerExceptionpublic String createToken(String user) throws TokenHandlerException
TokenHandlerExceptionpublic String createToken(String user, int lifetimeInSeconds) throws TokenHandlerException
TokenHandlerExceptionpublic String createToken(HashMap<String,Object> claims, int lifetimeInSeconds) throws TokenHandlerException
TokenHandlerExceptionpublic int getSessionLength()
Copyright © 2021 Software Atelier Kamber. All rights reserved.