public interface OAuth2Message
OAuth2Request
layer.
It also contains the OAuth 2.0 constants.
With the simplicity of the OAuth 2.0 client it is unlikely that another version of this class
will need to be injected, but it can be with
com.google.inject.Provider| Modifier and Type | Method and Description |
|---|---|
String |
getAccessToken()
After a message is parsed it may contain an access token.
|
String |
getAuthorization()
If this is an Authorization Code flow this method will return the authorization_code from the
message.
|
OAuth2Error |
getError()
null error indicates the message parsed cleanly and the service provider did not
return an error. |
String |
getErrorDescription() |
String |
getErrorUri() |
String |
getExpiresIn() |
String |
getMacAlgorithm()
The MAC Algorithm http://tools.ietf.org/html/draft-hammer-oauth-v2-mac-token-05#section-5
|
String |
getMacSecret()
The MAC Secret http://tools.ietf.org/html/draft-hammer-oauth-v2-mac-token-05#section-5
|
Map<String,String> |
getParameters() |
String |
getRefreshToken() |
String |
getState() |
String |
getTokenType() |
Map<String,String> |
getUnparsedProperties()
Additional properties that went unparsed (i.e.
|
void |
parseFragment(String fragment)
Populates an OAuth2Message from a query fragment.
|
void |
parseJSON(String jsonString)
Populates an OAuth2Message from a JSON response body.
|
void |
parseQuery(String queryString)
Populates an OAuth2Message from a URL query string.
|
void |
parseRequest(javax.servlet.http.HttpServletRequest request)
Populates an OAuth2Message from the entire
HttpServletRequest |
void |
setError(OAuth2Error error) |
void |
setErrorDescription(String errorDescription) |
void |
setErrorUri(String errorUri) |
static final String ACCESS_DENIED
static final String ACCESS_TOKEN
static final String AUTHORIZATION
static final String AUTHORIZATION_CODE
static final String AUTHORIZATION_HEADER
static final String BASIC_AUTH_TYPE
static final String BEARER_TOKEN_TYPE
static final String BODYHASH
static final String CLIENT_CREDENTIALS
static final String CLIENT_ID
static final String CLIENT_SECRET
static final String CONFIDENTIAL_CLIENT_TYPE
static final String ERROR
static final String ERROR_DESCRIPTION
static final String ERROR_URI
static final String EXPIRES_IN
static final String GRANT_TYPE
static final String HMAC_SHA_1
static final String HMAC_SHA_256
static final String ID
static final String INVALID_CLIENT
static final String INVALID_GRANT
static final String INVALID_REQUEST
static final String INVALID_SCOPE
static final String MAC
static final String MAC_ALGORITHM
static final String MAC_EXT
static final String MAC_HEADER
static final String MAC_SECRET
static final String MAC_TOKEN_TYPE
static final String NO_GRANT_TYPE
static final String NONCE
static final String PUBLIC_CLIENT_TYPE
static final String REDIRECT_URI
static final String REFRESH_TOKEN
static final String RESPONSE_TYPE
static final String SCOPE
static final String SERVER_ERROR
static final String SHARED_TOKEN
static final String STANDARD_AUTH_TYPE
static final String STATE
static final String TEMPORARILY_UNAVAILABLE
static final String TOKEN_RESPONSE
static final String TOKEN_TYPE
static final String UNAUTHORIZED_CLIENT
static final String UNSUPPORTED_GRANT_TYPE
static final String UNSUPPORTED_RESPONSE_TYPE
String getAccessToken()
String getAuthorization()
OAuth2Error getError()
null error indicates the message parsed cleanly and the service provider did not
return an error.String getErrorDescription()
String getErrorUri()
String getExpiresIn()
String getMacAlgorithm()
String getMacSecret()
Map<String,String> getParameters()
Map of all parameters in the messageString getRefreshToken()
String getState()
String getTokenType()
Map<String,String> getUnparsedProperties()
void parseFragment(String fragment)
fragment - void parseJSON(String jsonString)
jsonString - returned from token endpoint requestvoid parseQuery(String queryString)
queryString - from redirect_uri called by servcie providervoid parseRequest(javax.servlet.http.HttpServletRequest request)
HttpServletRequestrequest - to parsevoid setError(OAuth2Error error)
error - void setErrorDescription(String errorDescription)
errorDescription - void setErrorUri(String errorUri)
errorUri - Copyright © 2007-2014 The Apache Software Foundation. All Rights Reserved.