|
||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||||
See:
Description
| Class Summary | |
|---|---|
| GoogleOAuthAuthorizeTemporaryTokenUrl | Deprecated. (scheduled to be removed in 1.11) Use
GoogleAuthorizationCodeRequestUrl |
| GoogleOAuthDomainWideDelegation | Deprecated. (scheduled to be removed in 1.11) Use
GoogleCredential |
| GoogleOAuthDomainWideDelegation.Url | Generic URL that extends GoogleUrl and also provides the GoogleOAuthDomainWideDelegation.Url.requestorId
parameter. |
| GoogleOAuthGetAccessToken | Deprecated. (scheduled to be removed in 1.11) Use
GoogleAuthorizationCodeTokenRequest |
| GoogleOAuthGetTemporaryToken | Deprecated. (scheduled to be removed in 1.11) Use
GoogleAuthorizationCodeTokenRequest |
Google's additions to OAuth 1.0a authorization as specified in Google's OAuth API Reference (see detailed package specification).
Before using this library, you need to set up your application as follows:
consumerKey on
every OAuth request, for example in
AbstractOAuthGetToken.consumerKey.OAuthHmacSigner.
clientSharedSecret
when using the "HMAC-SHA1" signature method.OAuthRsaSigner for this "RSA-SHA1" signature
method.
# Generate the RSA keys and certificate
keytool -genkey -v -alias Example -keystore ./Example.jks\
-keyalg RSA -sigalg SHA1withRSA\
-dname "CN=myappname.appspot.com, OU=Engineering, O=My_Company, L=Mountain View, ST=CA, C=US"\
-storepass changeme -keypass changeme
# Output the public certificate to a file
keytool -export -rfc -keystore ./Example.jks -storepass changeme \
-alias Example -file mycert.pem"HMAC-SHA1" signature method. Use "anonymous" for
the consumerKey and clientSharedSecret.After the set up has been completed, the typical application flow is:
GoogleOAuthGetTemporaryToken. A
callback URL should be specified for web applications, but does not need to be specified for
installed applications.GoogleOAuthAuthorizeTemporaryTokenUrl.OAuthCallbackUrl."" for the verification code.GoogleOAuthGetAccessToken. This access token
must be stored.OAuthParameters.token and using
OAuthParameters as the
HttpRequestInitializer.GoogleOAuthDomainWideDelegation as a request
execute interceptor to set the e-mail address of the user on every HTTP request, or
GoogleOAuthDomainWideDelegation.Url as a
generic URL builder with the requestor ID parameter.GoogleOAuthGetAccessToken.revokeAccessToken(com.google.api.client.http.HttpTransport, com.google.api.client.auth.oauth.OAuthParameters).
Users can also manually revoke tokens from Google's change authorized websites page.
Warning: this package is experimental, and its content may be changed in incompatible ways or possibly entirely removed in a future version of the library
|
||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||||