public class OAuth2Code extends Object implements Comparable<OAuth2Code>
| Constructor and Description |
|---|
OAuth2Code() |
OAuth2Code(String value)
Constructs an OAuth2Code with a value.
|
OAuth2Code(String value,
String redirectURI,
long expiration,
List<String> scope)
Constructs an OAuth2Code.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(OAuth2Code target)
Compares this code to another code.
|
OAuth2Client |
getClient()
Returns the client associated with this code.
|
long |
getExpiration()
Returns when this code expires.
|
String |
getRedirectURI()
Returns the redirect URI associated with this code.
|
OAuth2Code |
getRelatedAccessToken()
Gets the related access token.
|
OAuth2Code |
getRelatedAuthCode()
Returns the authorization code related to this code.
|
OAuth2Code |
getRelatedRefreshToken()
Gets the related refresh token.
|
List<String> |
getScope()
Returns the scope of this code.
|
OAuth2Types.CodeType |
getType()
Returns the type of this code.
|
String |
getValue()
Returns the value of this code.
|
void |
setClient(OAuth2Client client)
Sets the client associated with this code.
|
void |
setExpiration(long expiration)
Sets the expiration of this code.
|
void |
setRedirectURI(String redirectURI)
Sets the redirect URI associated with this code.
|
void |
setRelatedAccessToken(OAuth2Code relatedAccessToken)
Sets the related access token.
|
void |
setRelatedAuthCode(OAuth2Code code)
Sets the authorization code that this code is related to, if applicable.
|
void |
setRelatedRefreshToken(OAuth2Code relatedRefreshToken)
Sets the related refresh token.
|
void |
setScope(List<String> scope)
Sets the scope of this code.
|
void |
setType(OAuth2Types.CodeType type)
Sets the type of this code; one of
AUTHORIZATION_CODE,
ACCESS_TOKEN,
REFRESH_TOKEN
|
void |
setValue(String value)
Sets the value of this code.
|
public OAuth2Code()
public OAuth2Code(String value, String redirectURI, long expiration, List<String> scope)
value - is the String key that makes up the coderedirectURI - is redirect URI associated with this codeexpiration - indicates when this code expiresscope - indicates the scope of this codepublic OAuth2Code(String value)
value - is the String key that makes up the codepublic String getValue()
public void setValue(String value)
value - is the value to set this code topublic String getRedirectURI()
public void setRedirectURI(String redirectURI)
redirectURI - represents the redirect URI of this codepublic long getExpiration()
public void setExpiration(long expiration)
expiration - is when this code will expirepublic int compareTo(OAuth2Code target)
compareTo in interface Comparable<OAuth2Code>public List<String> getScope()
public void setScope(List<String> scope)
scope - is this code's authorized scopepublic void setClient(OAuth2Client client)
client - is the client to associate with this codepublic OAuth2Client getClient()
public void setType(OAuth2Types.CodeType type)
type - is this code's typepublic OAuth2Types.CodeType getType()
public void setRelatedAuthCode(OAuth2Code code)
code - is the authorization code to associate with this codepublic OAuth2Code getRelatedAuthCode()
public void setRelatedRefreshToken(OAuth2Code relatedRefreshToken)
relatedRefreshToken - is the refresh token related to this codepublic OAuth2Code getRelatedRefreshToken()
public void setRelatedAccessToken(OAuth2Code relatedAccessToken)
relatedAccessToken - is the access token related to this codepublic OAuth2Code getRelatedAccessToken()
Copyright © 2007-2014 The Apache Software Foundation. All Rights Reserved.