|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.security.config.annotation.SecurityConfigurerAdapter<DefaultSecurityFilterChain,B> org.springframework.security.config.annotation.web.configurers.RequestCacheConfigurer<H>
public final class RequestCacheConfigurer<H extends HttpSecurityBuilder<H>>
Adds request cache for Spring Security. Specifically this ensures that
requests that are saved (i.e. after authentication is required) are later
replayed. All properties have reasonable defaults, so no additional
configuration is required other than applying this
SecurityConfigurer
.
RequestCache
, is provided a RequestCache
shared object is used to replay the request after authentication is
successful
RequestCache
Constructor Summary | |
---|---|
RequestCacheConfigurer()
|
Method Summary | |
---|---|
void |
configure(H http)
Configure the SecurityBuilder by setting the necessary properties
on the SecurityBuilder . |
B |
disable()
Disables the AbstractHttpConfigurer by removing it. |
void |
init(H http)
Initialize the SecurityBuilder . |
RequestCacheConfigurer<H> |
requestCache(RequestCache requestCache)
Allows explicit configuration of the RequestCache to be used. |
T |
withObjectPostProcessor(ObjectPostProcessor<?> objectPostProcessor)
|
Methods inherited from class org.springframework.security.config.annotation.SecurityConfigurerAdapter |
---|
addObjectPostProcessor, and, getBuilder, postProcess, setBuilder |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RequestCacheConfigurer()
Method Detail |
---|
public RequestCacheConfigurer<H> requestCache(RequestCache requestCache)
RequestCache
to be used. Defaults to try finding a
RequestCache
as a shared object. Then falls back to a HttpSessionRequestCache
.
requestCache
- the explicit RequestCache
to use
RequestCacheConfigurer
for further customizationpublic void init(H http) throws Exception
SecurityConfigurer
SecurityBuilder
. Here only shared state should be
created and modified, but not properties on the SecurityBuilder
used for building the object. This ensures that the
SecurityConfigurer.configure(SecurityBuilder)
method uses the correct shared
objects when building.
init
in interface SecurityConfigurer<DefaultSecurityFilterChain,H extends HttpSecurityBuilder<H>>
init
in class SecurityConfigurerAdapter<DefaultSecurityFilterChain,H extends HttpSecurityBuilder<H>>
Exception
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)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |