Package x.oauth
Class AccessToken
java.lang.Object
x.oauth.AccessToken
- All Implemented Interfaces:
Serializable
Represents an access token.
- Author:
- sakdsitt
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAccessToken(String tokenType, String expiresIn, String scope, boolean createRefreshToken, String refreshExpiresIn) Creates access token.AccessToken(String tokenType, String expiresIn, String scope, String refreshExpiresIn) Creates access token along with its refresh token.AccessToken(String tokenType, String expiresIn, String scope, String refreshToken, String refreshExpiresIn) Creates access token with already generated refresh token. -
Method Summary
Modifier and TypeMethodDescriptiongetId()getScope()getToken()getType()booleanisValid()static AccessTokenloadFromXData(XData data) booleanvoidsetClientId(String clientId) voidvoidsetCreationBy(String creationBy) voidsetCreationTime(Long creationTime) voidsetDetails(String details) voidsetExpiresIn(String expiresIn) voidvoidsetLastupdateBy(String lastupdateBy) voidsetLastupdateTime(Long lastupdateTime) voidsetRefreshExpiresIn(String refreshExpiresIn) voidsetRefreshToken(String refreshToken) voidvoidvoidvoidvoidsetValid(boolean valid) booleantoXData()
-
Constructor Details
-
AccessToken
Creates access token along with its refresh token. -
AccessToken
public AccessToken(String tokenType, String expiresIn, String scope, boolean createRefreshToken, String refreshExpiresIn) Creates access token. Used for generation of client_credentials type tokens with no refreshToken. -
AccessToken
public AccessToken(String tokenType, String expiresIn, String scope, String refreshToken, String refreshExpiresIn) Creates access token with already generated refresh token. -
AccessToken
public AccessToken()
-
-
Method Details
-
getId
-
setId
-
getToken
-
setToken
-
getRefreshToken
-
setRefreshToken
-
getExpiresIn
-
setExpiresIn
-
getType
-
setType
-
getScope
-
setScope
-
isValid
public boolean isValid() -
setValid
public void setValid(boolean valid) -
getClientId
-
setClientId
-
getCodeId
-
setCodeId
-
getUserId
-
setUserId
-
getDetails
-
setDetails
-
getCreationBy
-
setCreationBy
-
getLastupdateBy
-
setLastupdateBy
-
getCreationTime
-
setCreationTime
-
getLastupdateTime
-
setLastupdateTime
-
getRefreshExpiresIn
-
setRefreshExpiresIn
-
loadFromXData
-
toXData
-
tokenExpired
public boolean tokenExpired() -
refreshTokenExpired
public boolean refreshTokenExpired()
-