public class AuthToken extends Object
| Constructor and Description |
|---|
AuthToken(String userId,
SecretKey macKey,
Date expiration) |
| Modifier and Type | Method and Description |
|---|---|
static SecretKey |
generateKey(String keyPassword,
String keySalt) |
Date |
getExpiration() |
String |
getTokenId() |
String |
getUserId() |
boolean |
isExpired(int toleranceInSeconds) |
static AuthToken |
parse(String token,
SecretKey macKey) |
String |
serialize() |
public static SecretKey generateKey(String keyPassword, String keySalt) throws NoSuchAlgorithmException, InvalidKeySpecException
public static AuthToken parse(String token, SecretKey macKey) throws AuthTokenException
AuthTokenExceptionpublic String serialize() throws AuthTokenException
AuthTokenExceptionpublic String getTokenId()
public String getUserId()
public Date getExpiration()
public boolean isExpired(int toleranceInSeconds)
Copyright © 2016–2021 MWARE SOLUTIONS. All rights reserved.