File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed
web/src/main/java/org/springframework/security/web/server/csrf Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change 1919import java .io .Serial ;
2020
2121import org .springframework .security .access .AccessDeniedException ;
22- import org .springframework .security .web .csrf .CsrfToken ;
2322
2423/**
25- * Thrown when an invalid or missing {@link CsrfToken} is found in the HttpServletRequest
24+ * Thrown when an invalid or missing {@link CsrfToken} is found in the ServerWebExchange
2625 *
2726 * @author Rob Winch
28- * @since 3.2
27+ * @since 5.0
2928 */
3029public class CsrfException extends AccessDeniedException {
3130
Original file line number Diff line number Diff line change 1919import java .util .Map ;
2020import java .util .UUID ;
2121
22- import jakarta .servlet .http .HttpServletRequest ;
23- import jakarta .servlet .http .HttpSession ;
2422import reactor .core .publisher .Mono ;
2523import reactor .core .scheduler .Schedulers ;
2624
2725import org .springframework .util .Assert ;
2826import org .springframework .web .server .ServerWebExchange ;
27+ import org .springframework .web .server .WebSession ;
2928
3029/**
3130 * A {@link ServerCsrfTokenRepository} that stores the {@link CsrfToken} in the
32- * {@link HttpSession }.
31+ * {@link WebSession }.
3332 *
3433 * @author Rob Winch
3534 * @since 5.0
@@ -78,7 +77,7 @@ public Mono<CsrfToken> loadToken(ServerWebExchange exchange) {
7877 }
7978
8079 /**
81- * Sets the {@link HttpServletRequest } parameter name that the {@link CsrfToken} is
80+ * Sets the {@link ServerWebExchange } parameter name that the {@link CsrfToken} is
8281 * expected to appear on
8382 * @param parameterName the new parameter name to use
8483 */
@@ -98,7 +97,7 @@ public void setHeaderName(String headerName) {
9897 }
9998
10099 /**
101- * Sets the {@link HttpSession } attribute name that the {@link CsrfToken} is stored in
100+ * Sets the {@link WebSession } attribute name that the {@link CsrfToken} is stored in
102101 * @param sessionAttributeName the new attribute name to use
103102 */
104103 public void setSessionAttributeName (String sessionAttributeName ) {
You can’t perform that action at this time.
0 commit comments