shibboleth-dev - getting the REMOTE_USER header
Subject: Shibboleth Developers
List archive
- From: "Tom Scavo" <>
- To: "Shibboleth Development" <>
- Subject: getting the REMOTE_USER header
- Date: Sat, 15 Apr 2006 21:07:54 -0400
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=a/0XIZxmpwbi1bx5oEmPY7qcOdCbbA005/VrfFXtoZbpmY5+7PshUKzVcHCN2xIKU5BEozIy9NfQynmpcX5rjbcCq0CbBqw9BD0MDM6g8OdCFXsAxK/Ax2KnjSEfi0cXH8U+rSHOXtlESt6br57BDEqd2UJS3MQ3lt8L2MFoNvY=
In a servlet, I'm trying to replicate this chunk of code from
ShibbolethV1SSOHandler.java:
String username =
support.getIdPConfig().getAuthHeaderName().equalsIgnoreCase("REMOTE_USER")
?
request.getRemoteUser() :
request.getHeader(support.getIdPConfig().getAuthHeaderName());
I don't have access to an IdPProtocolSupport object, so I tried the following:
IdPConfig idpConfig =
new IdPConfig((Element)
IdPConfigLoader.getIdPConfig(getServletContext()));
String authHeaderName = idpConfig.getAuthHeaderName();
String username =
authHeaderName.equalsIgnoreCase("REMOTE_USER") ?
request.getRemoteUser() : request.getHeader(authHeaderName);
But when I request the servlet, I get this runtime error:
java.lang.ClassCastException:
com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl
edu.internet2.middleware.shibboleth.idp.CertificateRegistry.init(CertificateRegistry.java:95)
javax.servlet.GenericServlet.init(GenericServlet.java:211)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:407)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
java.lang.Thread.run(Thread.java:595)
Any suggestions or ideas?
Thanks,
Tom
- getting the REMOTE_USER header, Tom Scavo, 04/15/2006
- Re: getting the REMOTE_USER header, Chad La Joie, 04/15/2006
- Re: getting the REMOTE_USER header, Tom Scavo, 04/15/2006
- RE: getting the REMOTE_USER header, Scott Cantor, 04/15/2006
- RE: getting the REMOTE_USER header, Scott Cantor, 04/15/2006
- Re: getting the REMOTE_USER header, Tom Scavo, 04/15/2006
- RE: getting the REMOTE_USER header, Scott Cantor, 04/16/2006
- Re: getting the REMOTE_USER header, Tom Scavo, 04/15/2006
- Re: getting the REMOTE_USER header, Tom Scavo, 04/15/2006
- Re: getting the REMOTE_USER header, Chad La Joie, 04/15/2006
Archive powered by MHonArc 2.6.16.