you can use a Page that you also display and then in the configureResponse()
you can set the right status
like the AccessDeniedPage does:
protected void configureResponse()
{
super.configureResponse();
getWebRequestCycle().getWebResponse().getHttpServletResponse().setStatus(
HttpServletResponse.SC_FORBIDDEN);
}
or if you don't want a page but only set the status you can do:
RequestCycle.get().setRequestTarget(new IRequestTarget()
{
respond()
{
getWebRequestCycle().getWebResponse().getHttpServletResponse().setStatus(
HttpServletResponse.SC_FORBIDDEN);
}
});
On 7/4/07, Jesse Barnum <[EMAIL PROTECTED]> wrote:
What is the right way to use basic HTTP authentication? I know how to
read the headers to extract the username and password, but if they
don't match, or if they're not supplied, what is the best way to send
the 401 response to the user?
It seems like the
ISecuritySettings.setUnauthorizedComponentInstantiationListener()
method assumes that you want to present an HTML login component to
the user.
--Jesse Barnum, President, 360Works
http://www.360works.com
(770) 234-9293
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user