|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.api.client.googleapis.auth.clientlogin.ClientLogin
public final class ClientLogin
Client Login authentication method as described in ClientLogin for Installed Applications.
| Nested Class Summary | |
|---|---|
static class |
ClientLogin.ErrorInfo
Key/value data to parse an error response. |
static class |
ClientLogin.Response
Key/value data to parse a success response. |
| Field Summary | |
|---|---|
String |
accountType
Type of account to request authorization for. |
String |
applicationName
Short string identifying your application for logging purposes of the form: "companyName-applicationName-versionID". |
String |
authTokenType
Name of the Google service you're requesting authorization for, for example "cl" for
Google Calendar. |
String |
captchaAnswer
(optional) String entered by the user as an answer to a CAPTCHA challenge. |
String |
captchaToken
(optional) Token representing the specific CAPTCHA challenge. |
String |
password
User's password. |
GenericUrl |
serverUrl
URL for the Client Login authorization server. |
HttpTransport |
transport
HTTP transport required for executing request in authenticate(). |
String |
username
User's full email address. |
| Constructor Summary | |
|---|---|
ClientLogin()
|
|
| Method Summary | |
|---|---|
ClientLogin.Response |
authenticate()
Authenticates based on the provided field values. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public HttpTransport transport
authenticate().
public GenericUrl serverUrl
By default this is "https://www.google.com", but it may be overridden for testing
purposes.
public String applicationName
public String authTokenType
"cl" for
Google Calendar.
public String username
public String password
public String accountType
public String captchaToken
public String captchaAnswer
| Constructor Detail |
|---|
public ClientLogin()
| Method Detail |
|---|
public ClientLogin.Response authenticate()
throws ClientLoginResponseException,
IOException
Upgrade warning: in prior version 1.6 it threw an HttpResponseException on error, but
it now throws a ClientLoginResponseException.
ClientLoginResponseException - if the authentication response has an error code, such as
for a CAPTCHA challenge.
IOException - some other kind of I/O exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||