Top Description Methods
javax.mvc.security

public @Interface CsrfProtected

extends Annotation
Annotations
@Target:METHOD, TYPE
@Retention:RUNTIME
@Documented
@Inherited
Imports
java.lang.annotation.Documented, .Inherited, .Retention, .Target

A controller annotation to validate a CSRF token value received in a request whenever the property javax.mvc.security.Csrf#CSRF_PROTECTION is set to javax.mvc.security.Csrf.CsrfOptions#EXPLICIT. If the property javax.mvc.security.Csrf#CSRF_PROTECTION is set to javax.mvc.security.Csrf.CsrfOptions#IMPLICIT, then the use of this annotation is redundant. MVC implementations are only REQUIRED to enforce CSRF for POST controllers that consume payloads of type javax.ws.rs.core.MediaType#APPLICATION_FORM_URLENCODED_TYPE, but other HTTP methods and payloads may be optionally supported by the underlying implementation. If declared at the type level, it applies to all methods in the type.

Author
Santiago Pericas-Geertsen
Since
1.0
See Also
javax.mvc.security.Csrf

Method Summary

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString