public class CredentialsAuthenticator extends java.lang.Object implements Authenticator
| Constructor and Description |
|---|
CredentialsAuthenticator(SessionConfiguration sessionConfiguration,
com.google.api.client.auth.oauth2.Credential credential) |
| Modifier and Type | Method and Description |
|---|---|
com.google.api.client.auth.oauth2.Credential |
getCredential()
Get
Credential used for authentication |
SessionConfiguration |
getSessionConfiguration()
Get
SessionConfiguration used for providing signining information for requests |
boolean |
isRefreshable()
Indicates whether this authenticator can be refreshed.
|
okhttp3.Request |
refresh(okhttp3.Response response)
Refresh authentication token that is used to
Authenticator.signRequest(Request.Builder) |
void |
signRequest(okhttp3.Request.Builder builder)
Add authentication header required to the request.
|
public CredentialsAuthenticator(SessionConfiguration sessionConfiguration, com.google.api.client.auth.oauth2.Credential credential)
public void signRequest(okhttp3.Request.Builder builder)
AuthenticatorsignRequest in interface Authenticatorpublic boolean isRefreshable()
AuthenticatorisRefreshable in interface Authenticatorpublic okhttp3.Request refresh(okhttp3.Response response)
throws java.io.IOException
AuthenticatorAuthenticator.signRequest(Request.Builder)refresh in interface Authenticatorjava.io.IOExceptionpublic SessionConfiguration getSessionConfiguration()
AuthenticatorSessionConfiguration used for providing signining information for requestsgetSessionConfiguration in interface Authenticatorpublic com.google.api.client.auth.oauth2.Credential getCredential()
Credential used for authentication