aRaindogToo
Programmer
Hi!
I have a servlet authenticating users by the help of an LDAP server. Is there any way to use the LDAP realm functionality in Tomcat for this, without the use of a browser? Once the user has been authenticated, I need to do other stuff in my servlet, so all I'm relly interested in is whether the user was successfully authenticated or not. The reason I´d like to have the connection to the LDAP server handled by Tomcat, is that it's over SSL, and I haven´t found a smart way to reuse a channel once it's up. Creating a new SSL channel for each authentication is way to slow.
What I need is to be able to extract the users id and password (which will not be in the "j_*" form) from the incoming request, and then somehow manage to get it to the realm servlet making the authentication (j_security_check?). And, as I said before, then get back to my own servlet, returning other stuff to the caller. I have tried to redirect the incoming request via a dispatcher, but that doesn´t seem to work. I've also been thinking about filters, but... Well, I haven´t come up with anything yet.
Anybody has any ideas on how to do this?
Regards, jonas
I have a servlet authenticating users by the help of an LDAP server. Is there any way to use the LDAP realm functionality in Tomcat for this, without the use of a browser? Once the user has been authenticated, I need to do other stuff in my servlet, so all I'm relly interested in is whether the user was successfully authenticated or not. The reason I´d like to have the connection to the LDAP server handled by Tomcat, is that it's over SSL, and I haven´t found a smart way to reuse a channel once it's up. Creating a new SSL channel for each authentication is way to slow.
What I need is to be able to extract the users id and password (which will not be in the "j_*" form) from the incoming request, and then somehow manage to get it to the realm servlet making the authentication (j_security_check?). And, as I said before, then get back to my own servlet, returning other stuff to the caller. I have tried to redirect the incoming request via a dispatcher, but that doesn´t seem to work. I've also been thinking about filters, but... Well, I haven´t come up with anything yet.
Anybody has any ideas on how to do this?
Regards, jonas