Introduce assertions against Cookie
attributes in CookieResultMatchers
for MockMvc
#30285
Closed
3 tasks done
Labels
in: test
Issues in the test module
in: web
Issues in web modules (web, webmvc, webflux, websocket)
type: enhancement
A general enhancement
Milestone
Uh oh!
There was an error while loading. Please reload this page.
Overview
Servlet API 6.0 introduced
jakarta.servlet.http.Cookie.getAttribute(String)
for accessing attributes other than the standard attributes such asMax-Age
,Secure
, etc.However, there is currently no way to assert the values of such attributes in MockMvc. For example, you cannot assert the value of the
SameSite
attribute.In contrast,
org.springframework.test.web.reactive.server.CookieAssertions.sameSite(String, String)
provides first-class support for asserting against theSameSite
attribute when usingWebTestClient
.Related Issues
SameSite
cookie attribute inMockMvcHttpConnector
#30264Deliverables
Cookie
attributes inCookieResultMatchers
forMockMvc
.SameSite
cookie attribute.CookieResultMatchersDsl.kt
The text was updated successfully, but these errors were encountered: