File tree Expand file tree Collapse file tree
web/src/main/java/org/springframework/security/web/csrf Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222import jakarta .servlet .http .HttpServletResponse ;
2323import org .apache .commons .logging .Log ;
2424import org .apache .commons .logging .LogFactory ;
25+ import org .jspecify .annotations .Nullable ;
2526
2627import org .springframework .core .log .LogMessage ;
2728import org .springframework .util .Assert ;
3334 *
3435 * @author Steve Riesenberg
3536 * @author Yoobin Yoon
37+ * @author Andrey Litvitski
3638 * @since 5.8
3739 */
3840public class CsrfTokenRequestAttributeHandler implements CsrfTokenRequestHandler {
3941
4042 private static final Log logger = LogFactory .getLog (CsrfTokenRequestAttributeHandler .class );
4143
42- private String csrfRequestAttributeName = "_csrf" ;
44+ @ Nullable private String csrfRequestAttributeName = "_csrf" ;
4345
4446 /**
4547 * The {@link CsrfToken} is available as a request attribute named
@@ -49,7 +51,7 @@ public class CsrfTokenRequestAttributeHandler implements CsrfTokenRequestHandler
4951 * @param csrfRequestAttributeName the name of an additional request attribute with
5052 * the value of the CsrfToken. Default is {@link CsrfToken#getParameterName()}
5153 */
52- public final void setCsrfRequestAttributeName (String csrfRequestAttributeName ) {
54+ public final void setCsrfRequestAttributeName (@ Nullable String csrfRequestAttributeName ) {
5355 this .csrfRequestAttributeName = csrfRequestAttributeName ;
5456 }
5557
You can’t perform that action at this time.
0 commit comments