Examples of ConsumerCredentials


Examples of org.springframework.security.oauth.provider.ConsumerCredentials

  public void testOnValidSignature() throws Exception {
    ProtectedResourceProcessingFilter filter = new ProtectedResourceProcessingFilter();
    HttpServletRequest request = mock(HttpServletRequest.class);
    HttpServletResponse response = mock(HttpServletResponse.class);
    FilterChain chain = mock(FilterChain.class);
    ConsumerCredentials creds = new ConsumerCredentials("key", "sig", "meth", "base", "tok");
    ConsumerAuthentication authentication = new ConsumerAuthentication(mock(ConsumerDetails.class), creds);
    authentication.setAuthenticated(true);
    SecurityContextHolder.getContext().setAuthentication(authentication);
    OAuthProviderTokenServices tokenServices = mock(OAuthProviderTokenServices.class);
    OAuthAccessProviderToken token = mock(OAuthAccessProviderToken.class);
View Full Code Here

Examples of org.springframework.security.oauth.provider.ConsumerCredentials

            //extract the credentials.
            String token = oauthParams.get(OAuthConsumerParameter.oauth_token.toString());
            String signatureMethod = oauthParams.get(OAuthConsumerParameter.oauth_signature_method.toString());
            String signature = oauthParams.get(OAuthConsumerParameter.oauth_signature.toString());
            String signatureBaseString = getProviderSupport().getSignatureBaseString(request);
            ConsumerCredentials credentials = new ConsumerCredentials(consumerKey, signature, signatureMethod, signatureBaseString, token);

            //create an authentication request.
            ConsumerAuthentication authentication = new ConsumerAuthentication(consumerDetails, credentials, oauthParams);
            authentication.setDetails(createDetails(request, consumerDetails));
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.