File tree 2 files changed +10
-10
lines changed
web/src/main/java/org/springframework/security/web
2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -171,14 +171,14 @@ private String getRequestContext(HttpServletRequest request) {
171
171
}
172
172
173
173
/**
174
- * Factory method to conveniently create an instance that has
175
- * {@link #setCookieHttpOnly(boolean)} set to false.
176
- * @return an instance of CookieCsrfTokenRepository with
177
- * {@link #setCookieHttpOnly(boolean )} set to false
174
+ * Factory method to conveniently create an instance that creates cookies where
175
+ * {@link Cookie#isHttpOnly()} is set to false.
176
+ * @return an instance of CookieCsrfTokenRepository that creates cookies where
177
+ * {@link Cookie#isHttpOnly( )} is set to false.
178
178
*/
179
179
public static CookieCsrfTokenRepository withHttpOnlyFalse () {
180
180
CookieCsrfTokenRepository result = new CookieCsrfTokenRepository ();
181
- result .setCookieHttpOnly ( false );
181
+ result .setCookieCustomizer (( cookie ) -> cookie . httpOnly ( false ) );
182
182
return result ;
183
183
}
184
184
Original file line number Diff line number Diff line change @@ -77,14 +77,14 @@ public void setCookieCustomizer(Consumer<ResponseCookie.ResponseCookieBuilder> c
77
77
}
78
78
79
79
/**
80
- * Factory method to conveniently create an instance that has
81
- * {@link #setCookieHttpOnly(boolean) } set to false.
82
- * @return an instance of CookieCsrfTokenRepository with
83
- * {@link #setCookieHttpOnly(boolean) } set to false
80
+ * Factory method to conveniently create an instance that has creates cookies with
81
+ * {@link ResponseCookie#isHttpOnly } set to false.
82
+ * @return an instance of CookieCsrfTokenRepository that creates cookies with
83
+ * {@link ResponseCookie#isHttpOnly } set to false
84
84
*/
85
85
public static CookieServerCsrfTokenRepository withHttpOnlyFalse () {
86
86
CookieServerCsrfTokenRepository result = new CookieServerCsrfTokenRepository ();
87
- result .setCookieHttpOnly ( false );
87
+ result .setCookieCustomizer (( cookie ) -> cookie . httpOnly ( false ) );
88
88
return result ;
89
89
}
90
90
You can’t perform that action at this time.
0 commit comments