|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.sf.deadbolt.handlers.DeadboltHandler
This is the base class that all handlers extend from. The handler that you
write only needs to override the authenticate method that will
be called when a resource is requested that is protected by a room with your
handler defined.
| Constructor Summary | |
DeadboltHandler()
|
|
| Method Summary | |
void |
addErrorKey(javax.servlet.http.HttpServletRequest request,
java.lang.String errorKey)
This method will add an error to the request, which can later be used by the DisplayErrorsTag custom tag in a JSP error page. |
void |
addErrorMessage(javax.servlet.http.HttpServletRequest request,
java.lang.String errorMessage)
This method adds an error message without the need for a key. |
void |
addErrors(javax.servlet.http.HttpServletRequest request,
java.util.List errors)
This method does the same thing as the addError method,
but takes in a List as a parameter. |
abstract boolean |
authenticate(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Room room)
This method is the main body of the handler, which will tell the framework whether to let the user in or not. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DeadboltHandler()
| Method Detail |
public abstract boolean authenticate(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Room room)
request - response -
public void addErrorKey(javax.servlet.http.HttpServletRequest request,
java.lang.String errorKey)
DisplayErrorsTag custom tag in a JSP error page.
In a user defined handler, just call this method, passing in the request
and a error key, as defined in the deadbolt-config.xml file. This will
put the actual text of the error message in the request for the JSP page.
It's important for a developer writing a handler to make sure that the
spelling of the error key is correct. If not, then no message will be
found.
request - errorKey -
public void addErrors(javax.servlet.http.HttpServletRequest request,
java.util.List errors)
addError method,
but takes in a List as a parameter. This List
must contain only String objects.
request - errors - A List of errors
public void addErrorMessage(javax.servlet.http.HttpServletRequest request,
java.lang.String errorMessage)
request - errorMessage -
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||