You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/asciidoc/handlers/csrf.adoc
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
=== CsrfHandler
2
2
3
-
The javadoc:CsrfHandler[text="Cross Site Request Forgery Handler"] helps to protect from (CSRF)
3
+
The javadoc:handler.CsrfHandler[text="Cross Site Request Forgery Handler"] helps to protect from (CSRF)
4
4
attacks. Cross-site request forgeries are a type of malicious exploit whereby unauthorized commands
5
5
are performed on behalf of an authenticated user.
6
6
@@ -20,10 +20,10 @@ field in the form so that the CSRF protection middleware can validate the reques
20
20
</form>
21
21
----
22
22
23
-
The `csrf` is a request attribute created by the javadoc:CsrfHandler[] handler and rendered by a
23
+
The `csrf` is a request attribute created by the javadoc:handler.CsrfHandler[] handler and rendered by a
24
24
template engine. Here `{{csrf}}` we use Handlebars template engine (as example).
25
25
26
-
The javadoc:CsrfHandler[] handler, will automatically verify that the token in the request input
26
+
The javadoc:handler.CsrfHandler[] handler, will automatically verify that the token in the request input
27
27
matches the token stored in the session.
28
28
29
29
The token defaults name is `csrf` and can be provided as:
@@ -34,5 +34,5 @@ The token defaults name is `csrf` and can be provided as:
34
34
35
35
Configuration methods:
36
36
37
-
- javadoc:CsrfHandler["setTokenGenerator", java.util.Function]: Set a custom token generator. Defaults uses a random UUID.
38
-
- javadoc:CsrfHandler["setRequestFilter", java.util.Predicate]: Set a custom request filter. Defaults is to process `POST`, `PUT`, `PATCH` and `DELETE`.
37
+
- javadoc:handler.CsrfHandler["setTokenGenerator", java.util.function.Function]: Set a custom token generator. Defaults uses a random UUID.
38
+
- javadoc:handler.CsrfHandler["setRequestFilter", java.util.function.Predicate]: Set a custom request filter. Defaults is to process `POST`, `PUT`, `PATCH` and `DELETE`.
0 commit comments