|
|||||||||
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.HeadersConfigurer<H>
public final class HeadersConfigurer<H extends HttpSecurityBuilder<H>>
RememberMeConfigurer
Constructor Summary | |
---|---|
HeadersConfigurer()
Creates a new instance |
Method Summary | |
---|---|
HeadersConfigurer<H> |
addHeaderWriter(HeaderWriter headerWriter)
Adds a HeaderWriter instance |
HeadersConfigurer<H> |
cacheControl()
Adds CacheControlHeadersWriter . |
void |
configure(H http)
Configure the SecurityBuilder by setting the necessary properties
on the SecurityBuilder . |
HeadersConfigurer<H> |
contentTypeOptions()
Adds XContentTypeOptionsHeaderWriter |
B |
disable()
Disables the AbstractHttpConfigurer by removing it. |
HeadersConfigurer<H> |
frameOptions()
Adds XFrameOptionsHeaderWriter with all the default settings. |
HeadersConfigurer<H> |
httpStrictTransportSecurity()
Adds HstsHeaderWriter . |
T |
withObjectPostProcessor(ObjectPostProcessor<?> objectPostProcessor)
|
HeadersConfigurer<H> |
xssProtection()
Adds XXssProtectionHeaderWriter . |
Methods inherited from class org.springframework.security.config.annotation.SecurityConfigurerAdapter |
---|
addObjectPostProcessor, and, getBuilder, init, postProcess, setBuilder |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HeadersConfigurer()
HttpSecurity.headers()
Method Detail |
---|
public HeadersConfigurer<H> addHeaderWriter(HeaderWriter headerWriter)
HeaderWriter
instance
headerWriter
- the HeaderWriter
instance to add
HeadersConfigurer
for additional customizationspublic HeadersConfigurer<H> contentTypeOptions()
XContentTypeOptionsHeaderWriter
HeadersConfigurer
for additional customizationspublic HeadersConfigurer<H> xssProtection()
XXssProtectionHeaderWriter
. Note this is not comprehensive
XSS protection!
HeadersConfigurer
for additional customizationspublic HeadersConfigurer<H> cacheControl()
CacheControlHeadersWriter
.
HeadersConfigurer
for additional customizationspublic HeadersConfigurer<H> httpStrictTransportSecurity()
HstsHeaderWriter
.
HeadersConfigurer
for additional customizationspublic HeadersConfigurer<H> frameOptions()
XFrameOptionsHeaderWriter
with all the default settings.
HeadersConfigurer
for additional customizationspublic 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 |