Package org.apache.shindig.gadgets.oauth.BasicOAuthStoreConsumerKeyAndSecret

Examples of org.apache.shindig.gadgets.oauth.BasicOAuthStoreConsumerKeyAndSecret.KeyType


        boolean oauthBodyHash = true;
        String oauthBodyHashString = consumerInfo.optString(OAUTH_BODY_HASH_KEY);
        if ("false".equalsIgnoreCase(oauthBodyHashString)) {
          oauthBodyHash = false;
        }
        KeyType keyType = KeyType.HMAC_SYMMETRIC;

        if ("RSA_PRIVATE".equals(keyTypeStr)) {
          keyType = KeyType.RSA_PRIVATE;
          consumerSecret = BasicOAuthStore.convertFromOpenSsl(consumerSecret);
        } else if ("PLAINTEXT".equals(keyTypeStr)) {
View Full Code Here


      throw new GadgetException(Code.OAUTH_STORAGE_ERROR, "No OAuth key and secret defined for the service " + serviceName);
    }
   
    //BEGIN code from org.apache.shindig.gadgets.oauth.BasicOAuthStore.getConsumerKeyAndSercret
    OAuthConsumer consumer;
    final KeyType keyType = cks.getKeyType();
    if (keyType == KeyType.RSA_PRIVATE) {
      consumer = new OAuthConsumer(null, cks.getConsumerKey(), null, provider);
      // The oauth.net java code has lots of magic.  By setting this property here, code thousands
      // of lines away knows that the consumerSecret value in the consumer should be treated as
      // an RSA private key and not an HMAC key.
View Full Code Here

TOP

Related Classes of org.apache.shindig.gadgets.oauth.BasicOAuthStoreConsumerKeyAndSecret.KeyType

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.