How to access request from LoginModule?

O

ohaya

Hi,

I'm trying to implement at JAAS LoginModule to use in Tomcat, where
instead of getting information such as username and password from user
input, my LoginModule will retrieve some information from the request
headers.

So far, I have the basic LoginModule code working within Tomcat, so now
I need to add code to get the information that I need for the
LoginModule (which is in the request headers), but I don't know how to
access the information in the request headers from within the
LoginModule.

Has anyone tried something like this before, and if so, can you tell me
how I can get access to the request from within the LoginModule?

Thanks in advance!!

Jim
 
O

ohaya

ohaya said:
Hi,

I'm trying to implement at JAAS LoginModule to use in Tomcat, where
instead of getting information such as username and password from user
input, my LoginModule will retrieve some information from the request
headers.

So far, I have the basic LoginModule code working within Tomcat, so now
I need to add code to get the information that I need for the
LoginModule (which is in the request headers), but I don't know how to
access the information in the request headers from within the
LoginModule.

Has anyone tried something like this before, and if so, can you tell me
how I can get access to the request from within the LoginModule?

Thanks in advance!!


Hi,

I just figured this out, kind of :).

I'm posting this "for the record":

Basically, I never did find a way for the LoginModule to directly access
information in the requests. However, what I was able to do was that I
got Tomcat to serve the information that I needed as part of the
login.jsp page. When that gets submitted to j_security_check, I can
access that information via the JAAS Callback handler.

That was about it...

Jim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top