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();