Class OAuth2Token
-
- All Implemented Interfaces:
-
java.io.Serializable
@Serializable() public final class OAuth2Token implements SerializableThis class keeps all relevant OAuth token information.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classOAuth2Token.Builder
-
Field Summary
Fields Modifier and Type Field Description private final Set<String>scopesprivate final StringaccessTokenprivate final StringrefreshTokenprivate final Integerexpiryprivate final Stringscopeprivate final Stringtypeprivate LongcreatedTime
-
Method Summary
Modifier and Type Method Description final Set<String>getScopes()final StringgetAccessToken()final StringgetRefreshToken()final IntegergetExpiry()final StringgetScope()final StringgetType()final LonggetCreatedTime()final UnitsetCreatedTime(Long createdTime)StringtoString()Booleanequals(Object other)Tokens are considered to be equal if their access code is the same; all other properties are irrelevant for comparison. IntegerhashCode()The hash code depends only on the access token so that if this object is equal to another OAuth2Token, their hashes will also be equal. final static OAuth2TokencreateOAuth2TokenFromJsonString(String string)-
-
Method Detail
-
getScopes
final Set<String> getScopes()
-
getAccessToken
final String getAccessToken()
-
getRefreshToken
final String getRefreshToken()
-
getExpiry
final Integer getExpiry()
-
getScope
final String getScope()
-
getType
final String getType()
-
getCreatedTime
final Long getCreatedTime()
-
setCreatedTime
final Unit setCreatedTime(Long createdTime)
-
toString
String toString()
-
equals
Boolean equals(Object other)
Tokens are considered to be equal if their access code is the same; all other properties are irrelevant for comparison.
-
hashCode
Integer hashCode()
The hash code depends only on the access token so that if this object is equal to another OAuth2Token, their hashes will also be equal.
-
createOAuth2TokenFromJsonString
final static OAuth2Token createOAuth2TokenFromJsonString(String string)
-
-
-
-