this.sdbSocialAuthManager, req.getSession());
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 {
String id = req.getParameter("id");
SocialAuthManager socialAuthManager = null;
synchronized (req.getSession()) {
if (h.getAuthManager() != null) {
socialAuthManager = h.getAuthManager();
} else {
socialAuthManager = h.getMgr()
.getSocialAuthManager();
h.setAuthManager(socialAuthManager);
}
}
res.sendRedirect(socialAuthManager.getAuthenticationUrl(id,
h.getOpenidReturnUrl()));
return;
}
} catch (Throwable t) {