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

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


    requestUrl.append(AuthorizationServlet.AUTH_HANDLER);

    oAuthParameters.setOAuthCallback(requestUrl.toString());

    try {
      OAuthRsaSha1Signer signer = new OAuthRsaSha1Signer(getPrivateKey());
      GoogleOAuthHelper oauthHelper = new GoogleOAuthHelper(signer);

      // Step 1. Request token.
      oauthHelper.getUnauthorizedRequestToken(oAuthParameters);
View Full Code Here


  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

    OAuthHelper newOAuthHelper() throws Exception {
        OAuthSigner signer = null;
        if (getKeyLoader() == null) {
            signer = new OAuthHmacSha1Signer();
        } else {
            signer = new OAuthRsaSha1Signer(getPrivateKey());
        }
        return new GoogleOAuthHelper(signer);
    }
View Full Code Here

    OAuthHelper newOAuthHelper() throws Exception {
        OAuthSigner signer = null;
        if (getKeyLoader() == null) {
            signer = new OAuthHmacSha1Signer();
        } else {
            signer = new OAuthRsaSha1Signer(getPrivateKey());
        }
        return new GoogleOAuthHelper(signer);
    }
View Full Code Here

    // you must set your OAuth Consumer Secret, which can be obtained at
    // https://www.google.com/accounts/ManageDomains.
    OAuthSigner signer;
    switch (variables.getSignatureMethod()) {
      case RSA:
        signer = new OAuthRsaSha1Signer(variables.getSignatureKey());
        break;
      case HMAC:
        oauthParameters.setOAuthConsumerSecret(variables.getSignatureKey());
        signer = new OAuthHmacSha1Signer();
        break;
View Full Code Here

    OAuthHelper newOAuthHelper() throws Exception {
        OAuthSigner signer = null;
        if (getKeyLoader() == null) {
            signer = new OAuthHmacSha1Signer();
        } else {
            signer = new OAuthRsaSha1Signer(getPrivateKey());
        }
        return new GoogleOAuthHelper(signer);
    }
View Full Code Here

    // you must set your OAuth Consumer Secret, which can be obtained at
    // https://www.google.com/accounts/ManageDomains.
    OAuthSigner signer;
    switch (variables.getSignatureMethod()) {
      case RSA:
        signer = new OAuthRsaSha1Signer(variables.getSignatureKey());
        break;
      case HMAC:
        oauthParameters.setOAuthConsumerSecret(variables.getSignatureKey());
        signer = new OAuthHmacSha1Signer();
        break;
View Full Code Here

    requestUrl.append(AuthorizationServlet.AUTH_HANDLER);

    oAuthParameters.setOAuthCallback(requestUrl.toString());

    try {
      OAuthRsaSha1Signer signer = new OAuthRsaSha1Signer(getPrivateKey());
      GoogleOAuthHelper oauthHelper = new GoogleOAuthHelper(signer);

      // Step 1. Request token.
      oauthHelper.getUnauthorizedRequestToken(oAuthParameters);
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.