|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.melati.login.HttpBasicAuthenticationAccessHandler
public class HttpBasicAuthenticationAccessHandler
An AccessHandler
which uses the HTTP Basic Authentication scheme to
elicit and maintain the user's login and password.
This implementation doesn't use the servlet session at all,
so it doesn't try to send cookies or
do URL rewriting.
Constructor Summary | |
---|---|
HttpBasicAuthenticationAccessHandler()
|
Method Summary | |
---|---|
void |
buildRequest(Melati melati)
If we are allowed in then no need to change request. |
Melati |
establishUser(Melati melati)
Get the users details. |
protected void |
forceLogin(javax.servlet.http.HttpServletResponse resp,
String realm,
String message)
Force a login by sending a 401 error back to the browser. |
void |
handleAccessException(Melati melati,
AccessPoemException accessException)
Called when an AccessPoemException is trapped. |
protected boolean |
useSession()
Change here to use session, if that makes sense. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HttpBasicAuthenticationAccessHandler()
Method Detail |
---|
protected boolean useSession()
protected void forceLogin(javax.servlet.http.HttpServletResponse resp, String realm, String message)
public void handleAccessException(Melati melati, AccessPoemException accessException) throws Exception
handleAccessException
in interface AccessHandler
melati
- the MelatiaccessException
- the particular access exception to handle
the AccessException
Exception
handleAccessException(org.melati.Melati,
org.melati.poem.AccessPoemException)
public Melati establishUser(Melati melati)
establishUser
in interface AccessHandler
Melati
with the appropriate fields filled.AccessHandler.establishUser(org.melati.Melati)
public void buildRequest(Melati melati) throws IOException
buildRequest
in interface AccessHandler
melati
- used to hold original request
IOException
AccessHandler.buildRequest(org.melati.Melati)
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |