public static class AuthorizationCodeFlow.Builder extends Object
Implementation is not thread-safe.
| Constructor and Description |
|---|
AuthorizationCodeFlow.Builder(Credential.AccessMethod method,
com.google.api.client.http.HttpTransport transport,
com.google.api.client.json.JsonFactory jsonFactory,
com.google.api.client.http.GenericUrl tokenServerUrl,
com.google.api.client.http.HttpExecuteInterceptor clientAuthentication,
String clientId,
String authorizationServerEncodedUrl) |
| Modifier and Type | Method and Description |
|---|---|
AuthorizationCodeFlow |
build()
Returns a new instance of an authorization code flow based on this builder.
|
String |
getAuthorizationServerEncodedUrl()
Returns the authorization server encoded URL.
|
com.google.api.client.http.HttpExecuteInterceptor |
getClientAuthentication()
Returns the client authentication or
null for none (see
TokenRequest.setClientAuthentication(HttpExecuteInterceptor)). |
String |
getClientId()
Returns the client identifier.
|
com.google.api.client.util.Clock |
getClock()
Returns the clock passed along to the Credential or
Clock.SYSTEM when system default
is used. |
CredentialStore |
getCredentialStore()
Returns the credential persistence store or
null for none. |
com.google.api.client.json.JsonFactory |
getJsonFactory()
Returns the JSON factory.
|
Credential.AccessMethod |
getMethod()
Returns the method of presenting the access token to the resource server (for example
BearerToken.authorizationHeaderAccessMethod()). |
com.google.api.client.http.HttpRequestInitializer |
getRequestInitializer()
Returns the HTTP request initializer or
null for none. |
String |
getScopes()
Returns the space-separated list of scopes or
null for none. |
com.google.api.client.http.GenericUrl |
getTokenServerUrl()
Returns the token server URL.
|
com.google.api.client.http.HttpTransport |
getTransport()
Returns the HTTP transport.
|
AuthorizationCodeFlow.Builder |
setAuthorizationServerEncodedUrl(String authorizationServerEncodedUrl)
Sets the authorization server encoded URL.
|
AuthorizationCodeFlow.Builder |
setClientAuthentication(com.google.api.client.http.HttpExecuteInterceptor clientAuthentication)
Sets the client authentication or
null for none (see
TokenRequest.setClientAuthentication(HttpExecuteInterceptor)). |
AuthorizationCodeFlow.Builder |
setClientId(String clientId)
Sets the client identifier.
|
AuthorizationCodeFlow.Builder |
setClock(com.google.api.client.util.Clock clock)
Sets the clock to pass to the Credential.
|
AuthorizationCodeFlow.Builder |
setCredentialStore(CredentialStore credentialStore)
Sets the credential persistence store or
null for none. |
AuthorizationCodeFlow.Builder |
setJsonFactory(com.google.api.client.json.JsonFactory jsonFactory)
Sets the JSON factory.
|
AuthorizationCodeFlow.Builder |
setMethod(Credential.AccessMethod method)
Sets the method of presenting the access token to the resource server (for example
BearerToken.authorizationHeaderAccessMethod()). |
AuthorizationCodeFlow.Builder |
setRequestInitializer(com.google.api.client.http.HttpRequestInitializer requestInitializer)
Sets the HTTP request initializer or
null for none. |
AuthorizationCodeFlow.Builder |
setScopes(Iterable<String> scopes)
Sets the list of scopes or
null for none. |
AuthorizationCodeFlow.Builder |
setScopes(String... scopes)
Sets the list of scopes or
null for none. |
AuthorizationCodeFlow.Builder |
setTokenServerUrl(com.google.api.client.http.GenericUrl tokenServerUrl)
Sets the token server URL.
|
AuthorizationCodeFlow.Builder |
setTransport(com.google.api.client.http.HttpTransport transport)
Sets the HTTP transport.
|
public AuthorizationCodeFlow.Builder(Credential.AccessMethod method, com.google.api.client.http.HttpTransport transport, com.google.api.client.json.JsonFactory jsonFactory, com.google.api.client.http.GenericUrl tokenServerUrl, com.google.api.client.http.HttpExecuteInterceptor clientAuthentication, String clientId, String authorizationServerEncodedUrl)
method - method of presenting the access token to the resource server (for example
BearerToken.authorizationHeaderAccessMethod())transport - HTTP transportjsonFactory - JSON factorytokenServerUrl - token server URLclientAuthentication - client authentication or null for none (see
TokenRequest.setClientAuthentication(HttpExecuteInterceptor))clientId - client identifierauthorizationServerEncodedUrl - authorization server encoded URLpublic AuthorizationCodeFlow build()
public final Credential.AccessMethod getMethod()
BearerToken.authorizationHeaderAccessMethod()).public AuthorizationCodeFlow.Builder setMethod(Credential.AccessMethod method)
BearerToken.authorizationHeaderAccessMethod()).
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
public final com.google.api.client.http.HttpTransport getTransport()
public AuthorizationCodeFlow.Builder setTransport(com.google.api.client.http.HttpTransport transport)
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
public final com.google.api.client.json.JsonFactory getJsonFactory()
public AuthorizationCodeFlow.Builder setJsonFactory(com.google.api.client.json.JsonFactory jsonFactory)
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
public final com.google.api.client.http.GenericUrl getTokenServerUrl()
public AuthorizationCodeFlow.Builder setTokenServerUrl(com.google.api.client.http.GenericUrl tokenServerUrl)
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
public final com.google.api.client.http.HttpExecuteInterceptor getClientAuthentication()
null for none (see
TokenRequest.setClientAuthentication(HttpExecuteInterceptor)).public AuthorizationCodeFlow.Builder setClientAuthentication(com.google.api.client.http.HttpExecuteInterceptor clientAuthentication)
null for none (see
TokenRequest.setClientAuthentication(HttpExecuteInterceptor)).
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
public final String getClientId()
public AuthorizationCodeFlow.Builder setClientId(String clientId)
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
public final String getAuthorizationServerEncodedUrl()
public AuthorizationCodeFlow.Builder setAuthorizationServerEncodedUrl(String authorizationServerEncodedUrl)
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
public final CredentialStore getCredentialStore()
null for none.public final com.google.api.client.util.Clock getClock()
Clock.SYSTEM when system default
is used.public AuthorizationCodeFlow.Builder setClock(com.google.api.client.util.Clock clock)
The default value for this parameter is Clock.SYSTEM
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
public AuthorizationCodeFlow.Builder setCredentialStore(CredentialStore credentialStore)
null for none.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
public final com.google.api.client.http.HttpRequestInitializer getRequestInitializer()
null for none.public AuthorizationCodeFlow.Builder setRequestInitializer(com.google.api.client.http.HttpRequestInitializer requestInitializer)
null for none.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
public AuthorizationCodeFlow.Builder setScopes(Iterable<String> scopes)
null for none.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
scopes - list of scopes to be joined by a space separator (or a single value containing
multiple space-separated scopes)public AuthorizationCodeFlow.Builder setScopes(String... scopes)
null for none.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
scopes - list of scopes to be joined by a space separator (or a single value containing
multiple space-separated scopes)public final String getScopes()
null for none.Copyright © 2011-2012 Google. All Rights Reserved.