Package com.google.gdata.client.authn.oauth

Examples of com.google.gdata.client.authn.oauth.OAuthRsaSha1Signer


  public String getSessionTokenFromString(String requestQuery) {
    OAuthSigner signer = null;

    try {
      // Step 7. Exchange authorized request token for access token.
      signer = new OAuthRsaSha1Signer(getPrivateKey());
      GoogleOAuthHelper oauthHelper = new GoogleOAuthHelper(signer);
      oauthHelper.getOAuthParametersFromCallback(requestQuery, oAuthParameters);

      // Step 8. Upgrade to access token.
      return oauthHelper.getAccessToken(oAuthParameters);
View Full Code Here


  public void revokeToken(UserToken userToken) {
    OAuthSigner signer = null;
    oAuthParameters.setOAuthToken(userToken.getSessionToken());

    try {
      signer = new OAuthRsaSha1Signer(getPrivateKey());
      GoogleOAuthHelper oauthHelper = new GoogleOAuthHelper(signer);
      oauthHelper.revokeToken(oAuthParameters);
    } catch (OAuthException e) {
        authServiceError = e.getMessage();
    }
View Full Code Here

    OAuthSigner signer = null;
    oAuthParameters.setOAuthConsumerSecret(CONSUMER_SECRET);
    oAuthParameters.setOAuthToken(userToken.getSessionToken());

    try {
      signer = new OAuthRsaSha1Signer(getPrivateKey());
      googleService.setOAuthCredentials(oAuthParameters, signer);
    } catch (OAuthException e) {
      authServiceError = e.getMessage();
    }
  }
View Full Code Here

TOP

Related Classes of com.google.gdata.client.authn.oauth.OAuthRsaSha1Signer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.