Class SecurityMockMvcRequestBuilders.LogoutRequestBuilder
java.lang.Object
org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestBuilders.LogoutRequestBuilder
- All Implemented Interfaces:
org.springframework.beans.Mergeable
,org.springframework.test.web.servlet.RequestBuilder
- Enclosing class:
- SecurityMockMvcRequestBuilders
public static final class SecurityMockMvcRequestBuilders.LogoutRequestBuilder
extends Object
implements org.springframework.test.web.servlet.RequestBuilder, org.springframework.beans.Mergeable
Creates a logout request (including any necessary
CsrfToken
)- Since:
- 4.0
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.mock.web.MockHttpServletRequest
buildRequest
(jakarta.servlet.ServletContext servletContext) boolean
Specifies the logout URL to POST to.Specifies the logout URL to POST to.
-
Method Details
-
buildRequest
public org.springframework.mock.web.MockHttpServletRequest buildRequest(jakarta.servlet.ServletContext servletContext) - Specified by:
buildRequest
in interfaceorg.springframework.test.web.servlet.RequestBuilder
-
logoutUrl
Specifies the logout URL to POST to. Defaults to "/logout".- Parameters:
logoutUrl
- the logout URL to POST to. Defaults to "/logout".- Returns:
- the
SecurityMockMvcRequestBuilders.LogoutRequestBuilder
for additional customizations
-
logoutUrl
public SecurityMockMvcRequestBuilders.LogoutRequestBuilder logoutUrl(String logoutUrl, Object... uriVars) Specifies the logout URL to POST to.- Parameters:
logoutUrl
- the logout URL to POST to.uriVars
- the URI variables- Returns:
- the
SecurityMockMvcRequestBuilders.LogoutRequestBuilder
for additional customizations
-
isMergeEnabled
public boolean isMergeEnabled()- Specified by:
isMergeEnabled
in interfaceorg.springframework.beans.Mergeable
-
merge
- Specified by:
merge
in interfaceorg.springframework.beans.Mergeable
-