public class OAuth2 extends Object
Modifier and Type | Class and Description |
---|---|
static class |
OAuth2.Error |
static class |
OAuth2.Response |
Modifier and Type | Field and Description |
---|---|
String |
accessTokenURL |
String |
authorizationURL |
String |
clientid |
String |
secret |
Constructor and Description |
---|
OAuth2(String authorizationURL,
String accessTokenURL,
String clientid,
String secret) |
Modifier and Type | Method and Description |
---|---|
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(String callbackURL) |
void |
retrieveVerificationCode() |
void |
retrieveVerificationCode(String callbackURL)
First step of the OAuth2 process: redirects the user to the authorisation page
|
void |
retrieveVerificationCode(String callbackURL,
Map<String,String> parameters)
First step of the oAuth2 process.
|
void |
retrieveVerificationCode(String callbackURL,
String parameterName,
String parameterValue)
First step of the oAuth2 process.
|
public String authorizationURL
public String accessTokenURL
public String clientid
public String secret
public static boolean isCodeResponse()
public void retrieveVerificationCode(String callbackURL)
callbackURL
- public void retrieveVerificationCode(String callbackURL, String parameterName, 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(String callbackURL, Map<String,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(String callbackURL)
public OAuth2.Response retrieveAccessToken()
@Deprecated public void requestAccessToken()
@Deprecated public String getAccessToken()
Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly