Package org.owasp.csrfguard.servlet
Class JavaScriptServlet
- java.lang.Object
-
- jakarta.servlet.GenericServlet
-
- jakarta.servlet.http.HttpServlet
-
- org.owasp.csrfguard.servlet.JavaScriptServlet
-
- All Implemented Interfaces:
jakarta.servlet.Servlet,jakarta.servlet.ServletConfig,Serializable
public final class JavaScriptServlet extends jakarta.servlet.http.HttpServlet- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description JavaScriptServlet()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoGet(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)voiddoPost(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)static Set<String>getJavascriptUris()whitelist the javascript servlet from csrf errorsstatic jakarta.servlet.ServletConfiggetStaticServletConfig()voidinit(jakarta.servlet.ServletConfig theServletConfig)-
Methods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
-
-
-
-
Method Detail
-
getStaticServletConfig
public static jakarta.servlet.ServletConfig getStaticServletConfig()
-
getJavascriptUris
public static Set<String> getJavascriptUris()
whitelist the javascript servlet from csrf errors- Returns:
- the javascriptUris
-
init
public void init(jakarta.servlet.ServletConfig theServletConfig)
- Specified by:
initin interfacejakarta.servlet.Servlet- Overrides:
initin classjakarta.servlet.GenericServlet
-
doGet
public void doGet(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws IOException- Overrides:
doGetin classjakarta.servlet.http.HttpServlet- Throws:
IOException
-
doPost
public void doPost(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws IOException- Overrides:
doPostin classjakarta.servlet.http.HttpServlet- Throws:
IOException
-
-