|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.api.client.auth.oauth2.Credential.Builder
public static class Credential.Builder
Credential builder.
Implementation is not thread-safe.
| Constructor Summary | |
|---|---|
Credential.Builder(Credential.AccessMethod method)
|
|
| Method Summary | |
|---|---|
Credential.Builder |
addRefreshListener(CredentialRefreshListener refreshListener)
Adds a listener for refresh token results. |
Credential |
build()
Returns a new credential instance. |
HttpExecuteInterceptor |
getClientAuthentication()
Returns the client authentication or null for none (see
TokenRequest.setClientAuthentication(HttpExecuteInterceptor)). |
JsonFactory |
getJsonFactory()
Returns the JSON factory to use for parsing response for refresh token request or null if not refreshing tokens. |
Credential.AccessMethod |
getMethod()
Returns the method of presenting the access token to the resource server (for example BearerToken.AuthorizationHeaderAccessMethod). |
List<CredentialRefreshListener> |
getRefreshListeners()
Returns the listeners for refresh token results or null for none. |
HttpRequestInitializer |
getRequestInitializer()
Returns the HTTP request initializer for refresh token requests to the token server or null for none. |
GenericUrl |
getTokenServerUrl()
Returns the token server URL or null if not refreshing tokens. |
HttpTransport |
getTransport()
Returns the HTTP transport for executing refresh token request or null if not
refreshing tokens. |
Credential.Builder |
setClientAuthentication(HttpExecuteInterceptor clientAuthentication)
Sets the client authentication or null for none (see
TokenRequest.setClientAuthentication(HttpExecuteInterceptor)). |
Credential.Builder |
setJsonFactory(JsonFactory jsonFactory)
Sets the JSON factory to use for parsing response for refresh token request or null
if not refreshing tokens. |
Credential.Builder |
setRefreshListeners(List<CredentialRefreshListener> refreshListeners)
Sets the listeners for refresh token results or null for none. |
Credential.Builder |
setRequestInitializer(HttpRequestInitializer requestInitializer)
Sets the HTTP request initializer for refresh token requests to the token server or null for none. |
Credential.Builder |
setTokenServerEncodedUrl(String tokenServerEncodedUrl)
Sets the encoded token server URL or null if not refreshing tokens. |
Credential.Builder |
setTokenServerUrl(GenericUrl tokenServerUrl)
Sets the token server URL or null if not refreshing tokens. |
Credential.Builder |
setTransport(HttpTransport transport)
Sets the HTTP transport for executing refresh token request or null if not refreshing
tokens. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Credential.Builder(Credential.AccessMethod method)
method - method of presenting the access token to the resource server (for example
BearerToken.AuthorizationHeaderAccessMethod)| Method Detail |
|---|
public Credential build()
public final Credential.AccessMethod getMethod()
BearerToken.AuthorizationHeaderAccessMethod).
public final HttpTransport getTransport()
null if not
refreshing tokens.
public Credential.Builder setTransport(HttpTransport transport)
null if not refreshing
tokens.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
public final JsonFactory getJsonFactory()
null if not refreshing tokens.
public Credential.Builder setJsonFactory(JsonFactory jsonFactory)
null
if not refreshing tokens.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
public final GenericUrl getTokenServerUrl()
null if not refreshing tokens.
public Credential.Builder setTokenServerUrl(GenericUrl tokenServerUrl)
null if not refreshing tokens.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
public Credential.Builder setTokenServerEncodedUrl(String tokenServerEncodedUrl)
null if not refreshing tokens.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
public final HttpExecuteInterceptor getClientAuthentication()
null for none (see
TokenRequest.setClientAuthentication(HttpExecuteInterceptor)).
public Credential.Builder setClientAuthentication(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 HttpRequestInitializer getRequestInitializer()
null for none.
public Credential.Builder setRequestInitializer(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 Credential.Builder addRefreshListener(CredentialRefreshListener refreshListener)
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
refreshListener - refresh listenerpublic final List<CredentialRefreshListener> getRefreshListeners()
null for none.
public Credential.Builder setRefreshListeners(List<CredentialRefreshListener> refreshListeners)
null for none.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||