Package org.springframework.social.oauth2

Examples of org.springframework.social.oauth2.OAuth2Operations.buildAuthenticateUrl()


    OAuth2Parameters parameters = getOAuth2Parameters(request, defaultScope, additionalParameters);
    String state = connectionFactory.generateState();
    parameters.add("state", state);
    sessionStrategy.setAttribute(request, OAUTH2_STATE_ATTRIBUTE, state);
    if (useAuthenticateUrl) {
      return oauthOperations.buildAuthenticateUrl(parameters);
    } else {
      return oauthOperations.buildAuthorizeUrl(parameters);
    }
  }
View Full Code Here


    when(factory.getProviderId()).thenReturn(connection.getKey().getProviderId());
    when(factory.getOAuthOperations()).thenReturn(operations);
    when(factory.createConnection(accessGrant)).thenReturn(connection);

    when(
        operations.buildAuthenticateUrl(oAuth2Parameters("http://example.com/auth/foo?param=param_value"))).thenReturn(
        "http://facebook.com/auth");
    when(operations.exchangeForAccess(code, "http://example.com/auth/foo", null)).thenReturn(accessGrant);

    // first phase
    MockHttpServletRequest request = new MockHttpServletRequest(context, "GET", "/auth/foo");
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.