Package org.brickred.socialauth

Examples of org.brickred.socialauth.AuthProvider


      request.setAttribute("Message", "Status can't be left blank.");
      return "failure";
    }
    SASFHelper helper = SASFStaticHelper.getHelper(request);
    SocialAuthManager manager = helper.getAuthManager();
    AuthProvider provider = null;
    if (manager != null) {
      provider = manager.getCurrentAuthProvider();
    }
    if (provider != null) {
      try {
        provider.updateStatus(statusMessage);
        request.setAttribute("Message", "Status Updated successfully");
        return "success";
      } catch (SocialAuthException e) {
        request.setAttribute("Message", e.getMessage());
        e.printStackTrace();
View Full Code Here


  public String execute() throws Exception {

    SASFHelper helper = SASFStaticHelper.getHelper(request);
    SocialAuthManager manager = helper.getAuthManager();

    AuthProvider provider = null;
    if (manager != null) {
      provider = manager.getCurrentAuthProvider();
    }
    if (provider != null) {
      try {
        provider.uploadImage(statusMessage, imageFileFileName,
            new FileInputStream(imageFile));
        request.setAttribute("Message", "Status Updated successfully");
        return "success";
      } catch (SocialAuthException e) {
        request.setAttribute("Message", e.getMessage());
View Full Code Here

    String path = lookupPath(req);
    if (path != null && path.startsWith(h.getServletMain())) {
      try {
        if (path.equals(h.getServletSuccess())) {
          SocialAuthManager manager = h.getAuthManager();
          AuthProvider provider = manager.connect(SocialAuthUtil
              .getRequestParametersMap(req));
          h.setProvider(provider);
          res.sendRedirect(h.getWebappSuccessAction());
          return;
        } else {
View Full Code Here

  public Profile getProfile() {
    Profile profile = null;
    SocialAuthManager manager = getAuthManager();
    if (manager != null) {
      try {
        AuthProvider provider = manager.getCurrentAuthProvider();
        profile = provider.getUserProfile();

      } catch (Exception e) {
        e.printStackTrace();
      }
    }
View Full Code Here

    List<Contact> contactsList = null;
    SocialAuthManager manager = getAuthManager();
    if (manager != null) {
      contactsList = new ArrayList<Contact>();
      try {
        AuthProvider provider = manager.getCurrentAuthProvider();
        contactsList = provider.getContactList();
      } catch (Exception e) {
        e.printStackTrace();
      }
    }
    return contactsList;
View Full Code Here

  @RequestMapping(value = "/authSuccess")
  public ModelAndView getRedirectURL(final HttpServletRequest request)
      throws Exception {
    SocialAuthManager manager = socialAuthTemplate.getSocialAuthManager();
    AuthProvider provider = manager.getCurrentAuthProvider();
    HttpSession session = request.getSession();
    String type = null;
    if (session.getAttribute(Constants.REQUEST_TYPE) != null) {
      type = (String) session.getAttribute(Constants.REQUEST_TYPE);
    }
View Full Code Here

      connectedProvidersIds = manager.getConnectedProvidersIds();
    }
    String providerIds = null;
    for (String id : connectedProvidersIds) {
      try {
        AuthProvider provider = manager.getProvider(id);
        provider.updateStatus(message);
        if (providerIds == null) {
          providerIds = provider.getProviderId();
        } else {
          providerIds += ", " + provider.getProviderId();
        }
      } catch (Exception e) {
        logger.error(e.getMessage());
      }
    }
View Full Code Here

      sb.append(line);
    }
    ObjectMapper mapper = new ObjectMapper();
    AccessGrant accessGrant = mapper.readValue(sb.toString(),
        AccessGrant.class);
    AuthProvider provider = socialAuthManager.connect(accessGrant);
    List<Feed> feeds = new ArrayList<Feed>();
    if (provider
        .isSupportedPlugin(org.brickred.socialauth.plugin.FeedPlugin.class)) {
      FeedPlugin p = provider
          .getPlugin(org.brickred.socialauth.plugin.FeedPlugin.class);
      feeds = p.getFeeds();
    }
    ModelAndView view = new ModelAndView("showwall", "feeds", feeds);
    return view;
View Full Code Here

   
    SocialAuthManager manager = null;
    if (userSession.get("socialAuthManager") != null) {
      manager = (SocialAuthManager)userSession.get("socialAuthManager");
    }
    AuthProvider provider = null;
    if(manager!=null){
      provider = manager.getCurrentAuthProvider();
    }
    if (provider != null) {
      try {
        provider.updateStatus(statusMessage);
        request.setAttribute("Message", "Status Updated successfully");
        return "success";
      } catch (SocialAuthException e) {
        request.setAttribute("Message", e.getMessage());
        LOG.error(e);
View Full Code Here

   
    SocialAuthManager manager = null;
    if (userSession.get("socialAuthManager") != null) {
      manager = (SocialAuthManager)userSession.get("socialAuthManager");
    }
    AuthProvider provider = null;
    if(manager!=null){
      provider = manager.getCurrentAuthProvider();
    }
    if (provider != null) {
      try {
        provider.uploadImage(statusMessage,
            imageFileFileName, new FileInputStream(imageFile));
        request.setAttribute("Message", "Status Updated successfully");
        return "success";
      } catch (SocialAuthException e) {
        request.setAttribute("Message", e.getMessage());
View Full Code Here

TOP

Related Classes of org.brickred.socialauth.AuthProvider

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.