public interface SpincastFormsCsrfProtectionFilter
You should add this filter with the "skipResourcesRequests()" options so it is ignored except for main routes.
| Modifier and Type | Method and Description |
|---|---|
SpincastCsrfToken |
getCurrentCsrfToken()
Returns the current CSRF token to use
Will be taken from the user session by default.
|
void |
handle(RequestContext<?> context)
Filter's handle main method.
|
void handle(RequestContext<?> context) throws FormInvalidOriginException, FormInvalidCsrfTokenException
FormInvalidOriginException - if the form was submitted
from an invalid orgine.FormInvalidCsrfTokenException - if the form was submitted
with an invalid CRSF token.SpincastCsrfToken getCurrentCsrfToken()
If there is none, a new one is created and save in the user's session! This will make the session being dirty and saved to the database.
Copyright © 2018. All rights reserved.