|
||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||||
See:
Description
| Class Summary | |
|---|---|
| GoogleOAuthAuthorizeTemporaryTokenUrl | Google OAuth 1.0a URL builder for a Google Accounts web page to allow the end user to authorize the temporary token. |
| GoogleOAuthDomainWideDelegation | Google's OAuth domain-wide delegation requires an e-mail address of the user whose data you are
trying to access via GoogleOAuthDomainWideDelegation.requestorId on every HTTP request. |
| GoogleOAuthDomainWideDelegation.Url | Generic URL that extends GoogleUrl and also provides the GoogleOAuthDomainWideDelegation.Url.requestorId
parameter. |
| GoogleOAuthGetAccessToken | Generic Google OAuth 1.0a URL to request to exchange the temporary credentials token (or "request token") for a long-lived credentials token (or "access token") from the Google Authorization server. |
| GoogleOAuthGetTemporaryToken | Generic Google OAuth 1.0a URL to request a temporary credentials token (or "request token") from the Google Authorization server. |
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 | |||||||||