public final class ServletApiConfigurer<H extends HttpSecurityBuilder<H>> extends SecurityConfigurerAdapter<DefaultSecurityFilterChain,B>
HttpServletRequest
using the SecurityContext
from the SecurityContextHolder
.
AuthenticationTrustResolver
is optionally used to populate the SecurityContextHolderAwareRequestFilter
Constructor and Description |
---|
ServletApiConfigurer()
Creates a new instance
|
Modifier and Type | Method and Description |
---|---|
void |
configure(H http)
Configure the
SecurityBuilder by setting the necessary properties
on the SecurityBuilder . |
B |
disable()
Disables the
AbstractHttpConfigurer by removing it. |
ServletApiConfigurer<H> |
rolePrefix(String rolePrefix) |
T |
withObjectPostProcessor(ObjectPostProcessor<?> objectPostProcessor) |
addObjectPostProcessor, and, getBuilder, init, postProcess, setBuilder
public ServletApiConfigurer()
HttpSecurity.servletApi()
public ServletApiConfigurer<H> rolePrefix(String rolePrefix)
public void configure(H http) throws Exception
SecurityConfigurer
SecurityBuilder
by setting the necessary properties
on the SecurityBuilder
.configure
in interface SecurityConfigurer<DefaultSecurityFilterChain,H extends HttpSecurityBuilder<H>>
configure
in class SecurityConfigurerAdapter<DefaultSecurityFilterChain,H extends HttpSecurityBuilder<H>>
Exception
public B disable()
AbstractHttpConfigurer
by removing it. After doing
so a fresh version of the configuration can be applied.HttpSecurityBuilder
for additional customizationspublic T withObjectPostProcessor(ObjectPostProcessor<?> objectPostProcessor)