Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import jakarta.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jspecify.annotations.Nullable;

import org.springframework.core.log.LogMessage;
import org.springframework.util.Assert;
Expand All @@ -33,13 +34,14 @@
*
* @author Steve Riesenberg
* @author Yoobin Yoon
* @author Andrey Litvitski
* @since 5.8
*/
public class CsrfTokenRequestAttributeHandler implements CsrfTokenRequestHandler {

private static final Log logger = LogFactory.getLog(CsrfTokenRequestAttributeHandler.class);

private String csrfRequestAttributeName = "_csrf";
@Nullable private String csrfRequestAttributeName = "_csrf";

/**
* The {@link CsrfToken} is available as a request attribute named
Expand All @@ -49,7 +51,7 @@ public class CsrfTokenRequestAttributeHandler implements CsrfTokenRequestHandler
* @param csrfRequestAttributeName the name of an additional request attribute with
* the value of the CsrfToken. Default is {@link CsrfToken#getParameterName()}
*/
public final void setCsrfRequestAttributeName(String csrfRequestAttributeName) {
public final void setCsrfRequestAttributeName(@Nullable String csrfRequestAttributeName) {
this.csrfRequestAttributeName = csrfRequestAttributeName;
}

Expand Down
Loading