|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.security.oauth2.common.DefaultOAuth2AccessToken
public class DefaultOAuth2AccessToken
Basic access token for OAuth 2.
Field Summary |
---|
Fields inherited from interface org.springframework.security.oauth2.common.OAuth2AccessToken |
---|
ACCESS_TOKEN, BEARER_TYPE, EXPIRES_IN, OAUTH2_TYPE, REFRESH_TOKEN, SCOPE, TOKEN_TYPE |
Constructor Summary | |
---|---|
DefaultOAuth2AccessToken(OAuth2AccessToken accessToken)
Copy constructor for access token. |
|
DefaultOAuth2AccessToken(String value)
Create an access token from the value provided. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
Map<String,Object> |
getAdditionalInformation()
Additional information that token granters would like to add to the token, e.g. |
Date |
getExpiration()
The instant the token expires. |
int |
getExpiresIn()
|
OAuth2RefreshToken |
getRefreshToken()
The refresh token associated with the access token, if any. |
Set<String> |
getScope()
The scope of the token. |
String |
getTokenType()
The token type, as introduced in draft 11 of the OAuth 2 spec. |
String |
getValue()
The token value. |
int |
hashCode()
|
boolean |
isExpired()
Convenience method for checking expiration |
void |
setAdditionalInformation(Map<String,Object> additionalInformation)
Additional information that token granters would like to add to the token, e.g. |
void |
setExpiration(Date expiration)
The instant the token expires. |
protected void |
setExpiresIn(int delta)
|
void |
setRefreshToken(OAuth2RefreshToken refreshToken)
The refresh token associated with the access token, if any. |
void |
setScope(Set<String> scope)
The scope of the token. |
void |
setTokenType(String tokenType)
The token type, as introduced in draft 11 of the OAuth 2 spec. |
DefaultOAuth2AccessToken |
setValue(String value)
|
String |
toString()
|
static OAuth2AccessToken |
valueOf(Map<String,String> tokenParams)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DefaultOAuth2AccessToken(String value)
public DefaultOAuth2AccessToken(OAuth2AccessToken accessToken)
accessToken
- Method Detail |
---|
public DefaultOAuth2AccessToken setValue(String value)
public String getValue()
getValue
in interface OAuth2AccessToken
public int getExpiresIn()
getExpiresIn
in interface OAuth2AccessToken
protected void setExpiresIn(int delta)
public Date getExpiration()
getExpiration
in interface OAuth2AccessToken
public void setExpiration(Date expiration)
expiration
- The instant the token expires.public boolean isExpired()
isExpired
in interface OAuth2AccessToken
public String getTokenType()
getTokenType
in interface OAuth2AccessToken
public void setTokenType(String tokenType)
tokenType
- The token type, as introduced in draft 11 of the OAuth 2 spec.public OAuth2RefreshToken getRefreshToken()
getRefreshToken
in interface OAuth2AccessToken
public void setRefreshToken(OAuth2RefreshToken refreshToken)
refreshToken
- The refresh token associated with the access token, if any.public Set<String> getScope()
getScope
in interface OAuth2AccessToken
public void setScope(Set<String> scope)
scope
- The scope of the token.public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
public static OAuth2AccessToken valueOf(Map<String,String> tokenParams)
public Map<String,Object> getAdditionalInformation()
getAdditionalInformation
in interface OAuth2AccessToken
public void setAdditionalInformation(Map<String,Object> additionalInformation)
additionalInformation
- the additional information to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |