Examples of SharedConsumerSecretImpl


Examples of org.springframework.security.oauth.common.signature.SharedConsumerSecretImpl

      catch (NullPointerException e) {
        throw new BeanCreationException("Could not load RSA certificate at " + secret + ".", e);
      }
    }
    else {
      consumer.setSignatureSecret(new SharedConsumerSecretImpl(secret));
    }
    return consumer;
  }
View Full Code Here

Examples of org.springframework.security.oauth.common.signature.SharedConsumerSecretImpl

    HashMap<String, ProtectedResourceDetails> detailsStore = new HashMap<String, ProtectedResourceDetails>();
    BaseProtectedResourceDetails googleDetails = new BaseProtectedResourceDetails();
    googleDetails.setRequestTokenURL("https://www.google.com/accounts/OAuthGetRequestToken");
    googleDetails.setAccessTokenURL("https://www.google.com/accounts/OAuthAuthorizeToken");
    googleDetails.setConsumerKey("anonymous");
    googleDetails.setSharedSecret(new SharedConsumerSecretImpl("anonymous"));
    googleDetails.setId("google");
    googleDetails.setUse10a(true);
    googleDetails.setSignatureMethod(HMAC_SHA1SignatureMethod.SIGNATURE_NAME);
    googleDetails.setRequestTokenHttpMethod("GET");
    HashMap<String, String> additional = new HashMap<String, String>();
View Full Code Here

Examples of org.springframework.security.oauth.common.signature.SharedConsumerSecretImpl

    OAuthSignatureMethod sigMethod = mock(OAuthSignatureMethod.class);

    when(details.getConsumerKey()).thenReturn("my-consumer-key");
    when(details.getSignatureMethod()).thenReturn(HMAC_SHA1SignatureMethod.SIGNATURE_NAME);
    when(details.getSignatureMethod()).thenReturn(HMAC_SHA1SignatureMethod.SIGNATURE_NAME);
    SharedConsumerSecret secret = new SharedConsumerSecretImpl("shh!!!");
    when(details.getSharedSecret()).thenReturn(secret);
    when(sigFactory.getSignatureMethod(HMAC_SHA1SignatureMethod.SIGNATURE_NAME, secret, null))
        .thenReturn(sigMethod);
    when(sigMethod.sign("MYSIGBASESTRING")).thenReturn("MYSIGNATURE");
View Full Code Here

Examples of org.springframework.security.oauth.common.signature.SharedConsumerSecretImpl

     *
     * @see org.springframework.security.oauth.provider.ConsumerDetails#
     * getSignatureSecret()
     */
    public SignatureSecret getSignatureSecret() {
        return new SharedConsumerSecretImpl(this.application.getSecret());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.