Package org.springframework.social.security

Examples of org.springframework.social.security.SocialAuthenticationRedirectException


        String openIdUrl = consumer.beginConsumption(request, claimedIdentity, returnToUrl, realm);
        if (log.isDebugEnabled()) {
          log.debug("return_to is '" + returnToUrl + "', realm is '" + realm + "'");
          log.debug("Redirecting to " + openIdUrl);
        }
        throw new SocialAuthenticationRedirectException(openIdUrl);
      } catch (OpenIDConsumerException e) {
        log.debug("Failed to consume claimedIdentity: " + claimedIdentity, e);
        throw new AuthenticationServiceException("Unable to process claimed identity '" + claimedIdentity + "'");
      }
    }
View Full Code Here


        params = new OAuth1Parameters();
        params.setCallbackUrl(returnToUrl);
      } else {
        params = OAuth1Parameters.NONE;
      }     
      throw new SocialAuthenticationRedirectException(ops.buildAuthenticateUrl(requestToken.getValue(), params));
    } else {
      // Second phase: request an access token
      OAuthToken requestToken = extractCachedRequestToken(request);
      if (requestToken == null) {
        logger.warn("requestToken unavailable for oauth_verifier");
View Full Code Here

    if (!StringUtils.hasText(code)) {
      OAuth2Parameters params =  new OAuth2Parameters();
      params.setRedirectUri(buildReturnToUrl(request));
      setScope(request, params);
      params.add("state", connectionFactory.generateState()); // TODO: Verify the state value after callback
      throw new SocialAuthenticationRedirectException(getConnectionFactory().getOAuthOperations().buildAuthenticateUrl(params));
    } else if (StringUtils.hasText(code)) {
      try {
        String returnToUrl = buildReturnToUrl(request);
        AccessGrant accessGrant = getConnectionFactory().getOAuthOperations().exchangeForAccess(code, returnToUrl, null);
        // TODO avoid API call if possible (auth using token would be fine)
View Full Code Here

TOP

Related Classes of org.springframework.social.security.SocialAuthenticationRedirectException

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.