You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by Matt Raible <ma...@raibledesigns.com> on 2002/12/10 06:04:09 UTC
Testing authentication
I discovered in the mail archives that cactus now supports form-based
authentication. I'd like to allow for both form-based and basic
authentication testing in my application.
In the documentation at:
http://jakarta.apache.org/cactus/howto_security.html, it mentions coding
for basic authentication using the following code:
public void beginBasicAuthentication(WebRequest theRequest)
{
theRequest.setRedirectorName("ServletRedirectorSecure");
theRequest.setAuthentication(
new BasicAuthentication("testuser", "testpassword"));
}
And in web.xml, you have a url-pattern of:
<url-pattern>/ServletRedirectorSecure</url-pattern>
If my web application uses *.do as it's protected URL, can I configure
this as a RedirectorName? It seems that this example describes only how
to test cactus/container authentication rather than my application's
configuration. I can use Xdoclet to switch the two, but I'd rather
configure it to test *.do than the ServletRedirectorySecure.
Also, is there an example of testing form-based authentication?
I'm guessing if I I use a servlet to proxy to form-based authentication,
it might not be need though?
Thanks,
Matt