public class OAuth2TokenPersistence extends Object implements OAuth2Token
OAuth2TokenOAuth2Token.Type| Constructor and Description |
|---|
OAuth2TokenPersistence() |
OAuth2TokenPersistence(OAuth2Encrypter encrypter) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
byte[] |
getEncryptedMacSecret() |
byte[] |
getEncryptedSecret() |
long |
getExpiresAt()
issuedAt + expires_in or 0 if no expires_in was sent by server
|
String |
getGadgetUri() |
long |
getIssuedAt()
Used for creating MAC token nonces
|
String |
getMacAlgorithm()
For use with the MAC token specification.
|
String |
getMacExt()
For use with the MAC token specification.
|
byte[] |
getMacSecret()
For use with the MAC token specification.
|
Map<String,String> |
getProperties()
Contains any additional properties sent on the token.
|
String |
getScope()
See
http://tools.ietf.org/html/draft-ietf-oauth-v2-21#section-3.3 |
byte[] |
getSecret() |
String |
getServiceName() |
String |
getTokenType() |
OAuth2Token.Type |
getType() |
String |
getUser() |
int |
hashCode() |
void |
setEncryptedMacSecret(byte[] encryptedSecret) |
void |
setEncryptedSecret(byte[] encryptedSecret) |
void |
setExpiresAt(long expiresAt)
Setter for expiresAt field
|
void |
setGadgetUri(String gadgetUri)
Setter for gadgetUri field
|
void |
setIssuedAt(long issuedAt)
Setter for issuedAt field
|
void |
setMacAlgorithm(String algorithm)
For use with the MAC token specification.
|
void |
setMacExt(String macExt) |
void |
setMacSecret(byte[] secret)
For use with the MAC token specification.
|
void |
setProperties(Map<String,String> properties)
Set the properties on the token
|
void |
setScope(String scope)
Setter for scope field
|
void |
setSecret(byte[] secret)
Setter for secret property
|
void |
setServiceName(String serviceName)
Setter for serviceName field
|
void |
setTokenType(String tokenType)
Setter for tokenType property
|
void |
setType(OAuth2Token.Type type)
Setter for type property
|
void |
setUser(String user)
Setter for user property
|
String |
toString() |
public OAuth2TokenPersistence()
@Inject public OAuth2TokenPersistence(OAuth2Encrypter encrypter)
public byte[] getEncryptedMacSecret()
public byte[] getEncryptedSecret()
public long getExpiresAt()
OAuth2TokengetExpiresAt in interface OAuth2Tokenpublic String getGadgetUri()
getGadgetUri in interface OAuth2Tokenpublic long getIssuedAt()
OAuth2TokengetIssuedAt in interface OAuth2Tokenpublic String getMacAlgorithm()
OAuth2TokengetMacAlgorithm in interface OAuth2Tokenpublic String getMacExt()
OAuth2TokengetMacExt in interface OAuth2Tokenpublic byte[] getMacSecret()
OAuth2TokengetMacSecret in interface OAuth2Tokenpublic Map<String,String> getProperties()
OAuth2TokengetProperties in interface OAuth2Tokenpublic String getScope()
OAuth2Tokenhttp://tools.ietf.org/html/draft-ietf-oauth-v2-21#section-3.3getScope in interface OAuth2Tokenpublic byte[] getSecret()
getSecret in interface OAuth2Tokenpublic String getServiceName()
getServiceName in interface OAuth2Tokenpublic String getTokenType()
getTokenType in interface OAuth2Tokenpublic OAuth2Token.Type getType()
getType in interface OAuth2Tokenpublic String getUser()
getUser in interface OAuth2Tokenpublic void setEncryptedMacSecret(byte[] encryptedSecret)
throws OAuth2EncryptionException
OAuth2EncryptionExceptionpublic void setEncryptedSecret(byte[] encryptedSecret)
throws OAuth2EncryptionException
OAuth2EncryptionExceptionpublic void setExpiresAt(long expiresAt)
OAuth2TokensetExpiresAt in interface OAuth2Tokenpublic void setGadgetUri(String gadgetUri)
OAuth2TokensetGadgetUri in interface OAuth2Tokenpublic void setIssuedAt(long issuedAt)
OAuth2TokensetIssuedAt in interface OAuth2Tokenpublic void setMacAlgorithm(String algorithm)
OAuth2TokensetMacAlgorithm in interface OAuth2Tokenpublic void setMacExt(String macExt)
public void setMacSecret(byte[] secret)
throws OAuth2RequestException
OAuth2TokensetMacSecret in interface OAuth2TokenOAuth2RequestExceptionpublic void setProperties(Map<String,String> properties)
OAuth2TokensetProperties in interface OAuth2Tokenpublic void setScope(String scope)
OAuth2TokensetScope in interface OAuth2Tokenpublic void setSecret(byte[] secret)
throws OAuth2RequestException
OAuth2TokensetSecret in interface OAuth2TokenOAuth2RequestExceptionpublic void setServiceName(String serviceName)
OAuth2TokensetServiceName in interface OAuth2Tokenpublic void setTokenType(String tokenType)
OAuth2TokensetTokenType in interface OAuth2Tokenpublic void setType(OAuth2Token.Type type)
OAuth2TokensetType in interface OAuth2Tokenpublic void setUser(String user)
OAuth2TokensetUser in interface OAuth2TokenCopyright © 2007-2014 The Apache Software Foundation. All Rights Reserved.