public class OAuth2
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
OAuth2.Error |
static class |
OAuth2.Response |
Modifier and Type | Field and Description |
---|---|
java.lang.String |
accessTokenURL |
java.lang.String |
authorizationURL |
java.lang.String |
clientid |
java.lang.String |
secret |
Constructor and Description |
---|
OAuth2(java.lang.String authorizationURL,
java.lang.String accessTokenURL,
java.lang.String clientid,
java.lang.String secret) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAccessToken()
Deprecated.
Use @{link play.libs.OAuth2.retrieveAccessToken()} instead
|
static boolean |
isCodeResponse() |
void |
requestAccessToken()
Deprecated.
Use @{link play.libs.OAuth2.retrieveVerificationCode()} instead
|
OAuth2.Response |
retrieveAccessToken() |
OAuth2.Response |
retrieveAccessToken(java.lang.String callbackURL) |
void |
retrieveVerificationCode() |
void |
retrieveVerificationCode(java.lang.String callbackURL)
First step of the OAuth2 process: redirects the user to the authorisation page
|
void |
retrieveVerificationCode(java.lang.String callbackURL,
java.util.Map<java.lang.String,java.lang.String> parameters)
First step of the oAuth2 process.
|
void |
retrieveVerificationCode(java.lang.String callbackURL,
java.lang.String parameterName,
java.lang.String parameterValue)
First step of the oAuth2 process.
|
public java.lang.String authorizationURL
public java.lang.String accessTokenURL
public java.lang.String clientid
public java.lang.String secret
public OAuth2(java.lang.String authorizationURL, java.lang.String accessTokenURL, java.lang.String clientid, java.lang.String secret)
public static boolean isCodeResponse()
public void retrieveVerificationCode(java.lang.String callbackURL)
callbackURL
- The callback URLpublic void retrieveVerificationCode(java.lang.String callbackURL, java.lang.String parameterName, java.lang.String parameterValue)
retrieveVerificationCode(String, Map)
callbackURL
- The URL to redirect the user to after authorizationparameterName
- An additional parameter nameparameterValue
- An additional parameter valuepublic void retrieveVerificationCode(java.lang.String callbackURL, java.util.Map<java.lang.String,java.lang.String> parameters)
callbackURL
- The URL to redirect the user to after authorisationparameters
- Any additional parameters that weren't included in the constructor. For example you might need to add
a response_type.public void retrieveVerificationCode()
public OAuth2.Response retrieveAccessToken(java.lang.String callbackURL)
public OAuth2.Response retrieveAccessToken()
@Deprecated public void requestAccessToken()
@Deprecated public java.lang.String getAccessToken()
Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly