|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object utils.OAuth2
public class OAuth2
Constructor Summary | |
---|---|
OAuth2()
|
Method Summary | |
---|---|
static void |
deleteToken(java.lang.String accessKey,
java.lang.String refreshKey)
|
static AccessToken |
generateAccessToken(java.lang.Long userId,
int ttl,
java.lang.String refreshToken)
generate access token |
static AccessToken |
generateAccessToken(java.lang.Long userId,
java.lang.String refreshToken)
generate access token |
static java.lang.String |
generateKey()
generate key |
static RefreshToken |
generateRefreshToken(java.lang.Long userId)
generate refresh token |
static RefreshToken |
generateRefreshToken(java.lang.Long userId,
int ttl)
generate refresh token |
static AccessToken |
getAccessToken(java.lang.String key)
|
static RefreshToken |
getRefreshToken(java.lang.String key)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OAuth2()
Method Detail |
---|
public static java.lang.String generateKey()
public static AccessToken generateAccessToken(java.lang.Long userId, java.lang.String refreshToken)
userId
- user idrefreshToken
- refresh token
AccessToken
public static AccessToken generateAccessToken(java.lang.Long userId, int ttl, java.lang.String refreshToken)
userId
- user idttl
- time to live in cacherefreshToken
- refresh token
AccessToken
public static AccessToken getAccessToken(java.lang.String key)
key
- access token key
AccessToken
public static void deleteToken(java.lang.String accessKey, java.lang.String refreshKey)
accessKey
- access token keyrefreshKey
- refresh token keypublic static RefreshToken generateRefreshToken(java.lang.Long userId)
userId
- user id
RefreshToken
public static RefreshToken generateRefreshToken(java.lang.Long userId, int ttl)
userId
- user idttl
- time to live in cache
RefreshToken
public static RefreshToken getRefreshToken(java.lang.String key)
key
- refresh token key
RefreshToken
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |