public interface OAuth2Token extends Serializable
Serializable to facilitate cluster storage and
caching across the various phases of OAuth 2.0 flows.
OAuth2Tokens are stored in the OAuth2Store, they may be held in memory or in another
persistence layer.| Modifier and Type | Interface and Description |
|---|---|
static class |
OAuth2Token.Type |
| Modifier and Type | Method and Description |
|---|---|
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() |
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 |
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
|
long getIssuedAt()
long getExpiresAt()
String getGadgetUri()
String getMacAlgorithm()
String getMacExt()
byte[] getMacSecret()
Map<String,String> getProperties()
String getScope()
http://tools.ietf.org/html/draft-ietf-oauth-v2-21#section-3.3byte[] getSecret()
String getServiceName()
String getTokenType()
OAuth2Token.Type getType()
String getUser()
void setExpiresAt(long expiresAt)
expiresIn - void setGadgetUri(String gadgetUri)
gadgetUri - void setIssuedAt(long issuedAt)
expiresIn - void setMacAlgorithm(String algorithm)
void setMacSecret(byte[] secret)
throws OAuth2RequestException
OAuth2RequestExceptionvoid setScope(String scope)
void setSecret(byte[] secret)
throws OAuth2RequestException
secret - OAuth2RequestExceptionvoid setServiceName(String serviceName)
serviceName - void setTokenType(String tokenType)
tokenType - void setType(OAuth2Token.Type type)
type - void setUser(String user)
user - Copyright © 2007-2014 The Apache Software Foundation. All Rights Reserved.