Examples of requestAccessToken()


Examples of com.baasbox.service.sociallogin.SocialLoginService.requestAccessToken()

   * @return
   */
  public static Result callback(String socialNetwork){
    try{
      SocialLoginService sc = SocialLoginService.by(socialNetwork,(String)ctx().args.get("appcode"));
      Token t = sc.requestAccessToken(request(),session());
      return ok("{\""+OAUTH_TOKEN+"\":\""+t.getToken()+"\",\""+OAUTH_SECRET+"\":\""+t.getSecret()+"\"}");
    }catch (UnsupportedSocialNetworkException e){
      return badRequest(e.getMessage());
    }catch (java.lang.IllegalArgumentException e){
      return badRequest(e.getMessage());
View Full Code Here

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

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

    } 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.