Package org.opensocial.auth

Examples of org.opensocial.auth.OAuth3LeggedScheme.requestAccessToken()


        try {
          String[] credentials = providerCredentials.get(provider.getName());
          OAuth3LeggedScheme authScheme = new OAuth3LeggedScheme(provider,
              credentials[0], credentials[1]);
          authScheme.setRequestToken(requestToken);
          authScheme.requestAccessToken(requestToken.token);
          persistAccessToken(authScheme.getAccessToken());
        } catch (OAuthException e) {
          throw new RuntimeException("Error occured fetching access token", e);
        } catch (URISyntaxException e) {
          throw new RuntimeException("Error occured fetching access token", e);
View Full Code Here


    } else {
      if (scheme.getAccessToken() != null) {
        chain.doFilter(req, resp);
      } else if (scheme.getRequestToken() != null && tokenParam != null) {
        try {
          scheme.requestAccessToken(tokenParam, verifierParam);
          session.setAttribute(SCHEME_KEY, scheme);
          response.sendRedirect(request.getRequestURL().toString());
        } catch (Exception e) {
          e.printStackTrace();
        }
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.