public class OAuthClient extends Client
Client.RestService| Constructor and Description |
|---|
OAuthClient()
Constructs this object with no property values.
|
OAuthClient(OAuthCredentials credentials)
Constructs this object with client credntials.
|
OAuthClient(String clientId,
String clientSecret)
Constructs this object with a client identifier and a client secret.
|
| Modifier and Type | Method and Description |
|---|---|
protected AuthorizationCodeFlow |
getAuthorizationCodeFlow(boolean forTokenRequest)
Returns a authorization code flow for OAuth requests.
|
URI |
getAuthorizationEndpoint(URI redirectionEndpoint,
String state)
Returns the authorization endpoint URI for this object.
|
protected HttpExecuteInterceptor |
getBasicAuthentication()
Returns a HTTP execute interceptor with the client identifier and the
client secret for Basic authentication.
|
protected HttpExecuteInterceptor |
getClientParameters()
Returns a HTTP execute interceptor with only the client identifier as a
request parameter.
|
OAuthCredentials |
getCredentials()
Returns the OAuth client credentials of this object.
|
Service |
getService(String authorizationCode,
URI redirectionEndpoint)
Returns an authorized Bitbucket API service.
|
void |
setCredentials(OAuthCredentials credentials)
Sets the OAuth client credentials of this object.
|
getHttpTransport, getPassword, getService, getService, getUser, setPassword, setUserpublic OAuthClient()
public OAuthClient(String clientId, String clientSecret)
OAuthClient(OAuthCredentials)
called with a newly created OAuthCredentials object.clientId - client identifierclientSecret - client secretpublic OAuthClient(OAuthCredentials credentials)
setCredentials(org.vx68k.bitbucket.api.client.oauth.OAuthCredentials).credentials - client credentialspublic OAuthCredentials getCredentials()
null if this object
has no credentialspublic void setCredentials(OAuthCredentials credentials)
credentials - OAuth client credentials; if this value is
null, this object shall not have any credentialspublic URI getAuthorizationEndpoint(URI redirectionEndpoint, String state) throws URISyntaxException
redirectionEndpoint - redirection endpoint URI for the
authorization request; if this argument is null, the
redirect_uri parameter shall not be used.state - opaque state string for the authorization request; if this
argument is null, the state parameter shall
not be usedURISyntaxException - if the authorization endpoint URI could not
be constructedNullPointerException - if this object has no client credentialspublic Service getService(String authorizationCode, URI redirectionEndpoint) throws IOException
authorizationCode - authorization code received by the redirection
endpointredirectionEndpoint - redirection endpoint URI that was used in the
authorization request; if this argument is null, the
redirect_uri parameter shall not be used.IOException - if an I/O exception has occurredNullPointerException - if this object has no client credentialsprotected AuthorizationCodeFlow getAuthorizationCodeFlow(boolean forTokenRequest)
forTokenRequest - true for token requests, or
false for authorization requestsAuthorizationCodeFlow objectNullPointerException - if this object has no client credentialsprotected HttpExecuteInterceptor getClientParameters()
protected HttpExecuteInterceptor getBasicAuthentication()
Copyright © 2015 Nishimura Software Studio. All rights reserved.