----- Original Message ----- From: "Robert Oxspring" <[EMAIL PROTECTED]>
To: <users@tomcat.apache.org>
Sent: Saturday, May 17, 2008 12:49 PM
Subject: Multiple authentication schemes within a webapp


Hi,

I have a webapp that uses form based authentication but I'd like to also be able to login to it using basic authentication. The main use case for this is to present a nice form based login for web users, not involving the standard browser's username/password prompt, but also allow people to include their username and password into the url for use in the likes of wget and other tools.

Can anyone give me recommendations on how to achieve this? As far as I can tell I can't have more than one login-config elements in the web.xml. Would I need to implement a new Authenticator delegating to BasicAuthenticator and FormAuthenticator?

Thanks in advance for any advice,

Rob

I love this question... but I'm not sure ;)
You want to do something like this
http://userid:[EMAIL PROTECTED]/webapp/enterhere

I dont think it will let you do it directly...
But I cant see why you couldnt map the servlets slightly differently... if it is servlets.

so normal is /myPageThatSendsMeToAForm
That is the whole form auth thing

and

/myPageThatSendsMeToAForm/ENTERHERE
is setup for BASIC...
So if the person gets the url wrong the browser will put up the Password box...

and both are actually mapped to the same servlet...

I think TC is smart enuf for that... just a tiny little addon to a URL and a slightly different mapping.

If its JSP pages... I'm not sure and I think you would have to make a servlet...

Otherwise like Chris said... its probably a cool tool ;)

Tell us what you did in the end... ;)

---------------------------------------------------------------------------
HARBOR: http://coolharbor.100free.com/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
---------------------------------------------------------------------------

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to