Package org.springframework.security.oauth.common.signature

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


    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


                    (OAuthConsumer) actionController.execute(currentContext, getOAuthConsumerByConsumerKeyAction);

            BaseConsumerDetails details = new BaseConsumerDetails();
            details.setConsumerKey(inConsumerKey);
            details.setConsumerName(inConsumerKey);
            details.setSignatureSecret(new SharedConsumerSecret(consumer.consumerSecret));
            details.setAuthorities(grantedAuthorities);

            // NOTE: This line supports OAuth 2-legged only!
            details.setRequiredToObtainAuthenticatedToken(false);
View Full Code Here

TOP

Related Classes of org.springframework.security.oauth.common.signature.SharedConsumerSecret

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.