Google oauth2 api java

Google OAuth2 API v2 (revision 157)

Service definition for Oauth2 (v2). Obtains end-user authorization grants for use with other Google APIs. For more information about this service, see the API Documentation This service uses Oauth2RequestInitializer to initialize global parameters via its Oauth2.Builder .

Nested Class Summary

Field Summary

Constructor Summary

Method Summary

All Methods Instance Methods Concrete Methods
Modifier and Type Method and Description
protected void initialize (com.google.api.client.googleapis.services.AbstractGoogleClientRequest httpClientRequest)
Oauth2.Tokeninfo tokeninfo ()

Methods inherited from class com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient

Methods inherited from class com.google.api.client.googleapis.services.AbstractGoogleClient

Methods inherited from class java.lang.Object

Field Detail

DEFAULT_ROOT_URL

public static final java.lang.String DEFAULT_ROOT_URL

The default encoded root URL of the service. This is determined when the library is generated and normally should not be changed.

DEFAULT_SERVICE_PATH

public static final java.lang.String DEFAULT_SERVICE_PATH

The default encoded service path of the service. This is determined when the library is generated and normally should not be changed.

DEFAULT_BATCH_PATH

public static final java.lang.String DEFAULT_BATCH_PATH

The default encoded batch path of the service. This is determined when the library is generated and normally should not be changed.

DEFAULT_BASE_URL

public static final java.lang.String DEFAULT_BASE_URL

The default encoded base URL of the service. This is determined when the library is generated and normally should not be changed.

Constructor Detail

Oauth2

public Oauth2(com.google.api.client.http.HttpTransport transport, com.google.api.client.json.JsonFactory jsonFactory, com.google.api.client.http.HttpRequestInitializer httpRequestInitializer)
  • Google App Engine: com.google.api.client.extensions.appengine.http.UrlFetchTransport
  • Android: newCompatibleTransport from com.google.api.client.extensions.android.http.AndroidHttp
  • Java: com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport()
  • Jackson: com.google.api.client.json.jackson2.JacksonFactory
  • Google GSON: com.google.api.client.json.gson.GsonFactory
  • Android Honeycomb or higher: com.google.api.client.extensions.android.json.AndroidJsonFactory

Method Detail

initialize

protected void initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest httpClientRequest) throws java.io.IOException

userinfo

 Oauth2 oauth2 = new Oauth2(. ); Oauth2.Userinfo.List request = oauth2.userinfo().list(parameters . ) 

tokeninfo

public Oauth2.Tokeninfo tokeninfo() throws java.io.IOException

Create a request for the method «tokeninfo». This request holds the parameters needed by the oauth2 server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.

Источник

Читайте также:  Dict comprehension python примеры
Оцените статью