@Beta
public final class ClientLogin
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ClientLogin.ErrorInfo
Key/value data to parse an error response.
|
static class |
ClientLogin.Response
Key/value data to parse a success response.
|
| Modifier and Type | Field and Description |
|---|---|
java.lang.String |
accountType
Type of account to request authorization for.
|
java.lang.String |
applicationName
Short string identifying your application for logging purposes of the form:
"companyName-applicationName-versionID".
|
java.lang.String |
authTokenType
Name of the Google service you're requesting authorization for, for example
"cl" for
Google Calendar. |
java.lang.String |
captchaAnswer
(optional) String entered by the user as an answer to a CAPTCHA challenge.
|
java.lang.String |
captchaToken
(optional) Token representing the specific CAPTCHA challenge.
|
java.lang.String |
password
User's password.
|
com.google.api.client.http.GenericUrl |
serverUrl
URL for the Client Login authorization server.
|
com.google.api.client.http.HttpTransport |
transport
HTTP transport required for executing request in
authenticate(). |
java.lang.String |
username
User's full email address.
|
| Constructor and Description |
|---|
ClientLogin() |
| Modifier and Type | Method and Description |
|---|---|
ClientLogin.Response |
authenticate()
Authenticates based on the provided field values.
|
static java.lang.String |
getAuthorizationHeaderValue(java.lang.String authToken)
Returns Google Login
"Authorization" header value based on the given authentication
token. |
public com.google.api.client.http.HttpTransport transport
authenticate().public com.google.api.client.http.GenericUrl serverUrl
By default this is "https://www.google.com", but it may be overridden for testing
purposes.
public java.lang.String applicationName
public java.lang.String authTokenType
"cl" for
Google Calendar.public java.lang.String username
public java.lang.String password
public java.lang.String accountType
public java.lang.String captchaToken
public java.lang.String captchaAnswer
public ClientLogin.Response authenticate() throws java.io.IOException
ClientLoginResponseException - if the authentication response has an error code, such as
for a CAPTCHA challenge.java.io.IOExceptionpublic static java.lang.String getAuthorizationHeaderValue(java.lang.String authToken)
"Authorization" header value based on the given authentication
token.Copyright © 2010-2018 Google. All Rights Reserved.