Improve the debugging statements.
This commit is contained in:
parent
193936b80a
commit
78ad75cc6d
1 changed files with 14 additions and 1 deletions
|
@ -5,6 +5,7 @@ package edu.cornell.mannlib.vitro.webapp.controller.authenticate;
|
||||||
import static edu.cornell.mannlib.vitro.webapp.controller.authenticate.LoginExternalAuthSetup.ATTRIBUTE_REFERRER;
|
import static edu.cornell.mannlib.vitro.webapp.controller.authenticate.LoginExternalAuthSetup.ATTRIBUTE_REFERRER;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.Enumeration;
|
||||||
|
|
||||||
import javax.servlet.ServletException;
|
import javax.servlet.ServletException;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
@ -50,10 +51,22 @@ public class LoginExternalAuthReturn extends BaseLoginServlet {
|
||||||
@Override
|
@Override
|
||||||
protected void doPost(HttpServletRequest req, HttpServletResponse resp)
|
protected void doPost(HttpServletRequest req, HttpServletResponse resp)
|
||||||
throws ServletException, IOException {
|
throws ServletException, IOException {
|
||||||
|
if (log.isDebugEnabled()) {
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
Enumeration<String> names = req.getHeaderNames();
|
||||||
|
|
||||||
|
log.debug("------------request:" + req.getRequestURL());
|
||||||
|
while (names.hasMoreElements()) {
|
||||||
|
String name = names.nextElement();
|
||||||
|
log.debug(name + "=" + req.getHeader(name));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String externalAuthId = ExternalAuthHelper.getHelper(req)
|
String externalAuthId = ExternalAuthHelper.getHelper(req)
|
||||||
.getExternalAuthId(req);
|
.getExternalAuthId(req);
|
||||||
|
log.debug("externalAuthID='" + externalAuthId + "'");
|
||||||
|
|
||||||
if (externalAuthId == null) {
|
if (externalAuthId == null) {
|
||||||
log.debug("No externalAuthId.");
|
|
||||||
complainAndReturnToReferrer(req, resp, ATTRIBUTE_REFERRER,
|
complainAndReturnToReferrer(req, resp, ATTRIBUTE_REFERRER,
|
||||||
MESSAGE_LOGIN_FAILED);
|
MESSAGE_LOGIN_FAILED);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Reference in a new issue