Package org.owasp.csrfguard.action
Interface IAction
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
AbstractAction,Empty,Error,Forward,Invalidate,Log,Redirect,RequestAttribute,Rotate
public interface IAction extends Serializable
Interface enabling interaction with Actions, that are invoked in case of a potential CSRF attack
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidexecute(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, CsrfGuardException csrfGuardException, CsrfGuard csrfGuard)Executes this action.StringgetName()StringgetParameter(String name)Map<String,String>getParameterMap()voidsetName(String name)Sets the name of the actionvoidsetParameter(String name, String value)Sets a parameter with a custom name and value
-
-
-
Method Detail
-
setName
void setName(String name)
Sets the name of the action- Parameters:
name- the name of the action
-
getName
String getName()
- Returns:
- the name of the action
-
setParameter
void setParameter(String name, String value)
Sets a parameter with a custom name and value- Parameters:
name- the name of the parametervalue- the value of the parameter
-
getParameter
String getParameter(String name)
- Parameters:
name- the name of the parameter- Returns:
- the configured parameter based on its name
-
execute
void execute(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, CsrfGuardException csrfGuardException, CsrfGuard csrfGuard) throws CsrfGuardExceptionExecutes this action.- Parameters:
request- the HTTP request that triggered a potential CSRF attackresponse- the HTTP response object associated with the potentially malicious HTTP requestcsrfGuardException- the CSRF Guard exception objectcsrfGuard- the main CSRF Guard object, with access to inner workings of the solution- Throws:
CsrfGuardException- the exception type thrown in case of a potential CSRF attack
-
-