Package org.brickred.socialauth

Examples of org.brickred.socialauth.SocialAuthManager.connect()


    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


  private void callback(final HttpServletRequest request) {
    SocialAuthManager m = socialAuthTemplate.getSocialAuthManager();
    if (m != null) {
      try {
        AuthProvider provider = m.connect(SocialAuthUtil
            .getRequestParametersMap(request));
        LOG.debug("Connected Provider : " + provider.getProviderId());
      } catch (Exception e) {
        e.printStackTrace();
      }
View Full Code Here

      List<Contact> contactsList = new ArrayList<Contact>();
      Profile profile = null;
      try {
        Map<String, String> paramsMap = SocialAuthUtil
            .getRequestParametersMap(request);
        AuthProvider provider = manager.connect(paramsMap);
        profile = provider.getUserProfile();
        contactsList = provider.getContactList();
        if (contactsList != null && contactsList.size() > 0) {
          for (Contact p : contactsList) {
            if (StringUtils.isEmpty(p.getFirstName())
View Full Code Here

     
      Map<String, String> paramsMap = SocialAuthUtil.getRequestParametersMap(req);
     
      AuthProvider provider;
        try {
            provider = manager.connect(paramsMap);
        } catch (Exception e) {
            throw new ScriptusRuntimeException(e);
        }

        String tokenKey = provider.getAccessGrant().getKey();
View Full Code Here

    SocialAuthManager manager = (SocialAuthManager) session.getAttribute("openid_manager");
    if (manager == null)
      throw new SocialAuthException("Not manager found!");
    session.removeAttribute("openid_manager"); //防止重复登录的可能性
    Map<String, String> paramsMap = SocialAuthUtil.getRequestParametersMap(request);
    AuthProvider provider = manager.connect(paramsMap);
    Profile p = provider.getUserProfile();
        BasicDBObject query = new BasicDBObject().append("validatedId", p.getValidatedId()).append("provider", providerId);
        User user = dao.findOne(User.class, query);
        if (user == null) {
          user = new User();
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.