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 2020
2121import jakarta .servlet .http .HttpServletRequest ;
2222import jakarta .servlet .http .HttpServletResponse ;
23+ import org .jspecify .annotations .Nullable ;
2324import org .apache .commons .logging .Log ;
2425import org .apache .commons .logging .LogFactory ;
2526
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
44+ @ Nullable
4245 private String csrfRequestAttributeName = "_csrf" ;
4346
4447 /**
@@ -49,7 +52,7 @@ public class CsrfTokenRequestAttributeHandler implements CsrfTokenRequestHandler
4952 * @param csrfRequestAttributeName the name of an additional request attribute with
5053 * the value of the CsrfToken. Default is {@link CsrfToken#getParameterName()}
5154 */
52- public final void setCsrfRequestAttributeName (String csrfRequestAttributeName ) {
55+ public final void setCsrfRequestAttributeName (@ Nullable String csrfRequestAttributeName ) {
5356 this .csrfRequestAttributeName = csrfRequestAttributeName ;
5457 }
5558
You can’t perform that action at this time.
0 commit comments