Class SecurityProperties
- java.lang.Object
- org.springframework.boot.autoconfigure.security.SecurityProperties
- All Implemented Interfaces:
SecurityPrerequisite
@ConfigurationProperties(prefix="security") public class SecurityProperties extends Object implements SecurityPrerequisite
Properties for the security aspects of an application.
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SecurityProperties.Basic
static class
SecurityProperties.Headers
static class
SecurityProperties.User
Field Summary
Fields Modifier and Type Field Description static int
ACCESS_OVERRIDE_ORDER
Order before the basic authentication access control provided by Boot.static int
BASIC_AUTH_ORDER
Order applied to the WebSecurityConfigurerAdapter that is used to configure basic authentication for application endpoints.static int
DEFAULT_FILTER_ORDER
Default order of Spring Security's Filter in the servlet container (i.e.static int
IGNORED_ORDER
Order applied to the WebSecurityConfigurer that ignores standard static resource paths.
Constructor Summary
Constructors Constructor Description SecurityProperties()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SecurityProperties.Basic
getBasic()
Set<String>
getFilterDispatcherTypes()
int
getFilterOrder()
SecurityProperties.Headers
getHeaders()
List<String>
getIgnored()
org.springframework.security.config.http.SessionCreationPolicy
getSessions()
SecurityProperties.User
getUser()
boolean
isEnableCsrf()
boolean
isRequireSsl()
void
setBasic(SecurityProperties.Basic basic)
void
setEnableCsrf(boolean enableCsrf)
void
setFilterDispatcherTypes(Set<String> filterDispatcherTypes)
void
setFilterOrder(int filterOrder)
void
setIgnored(List<String> ignored)
void
setRequireSsl(boolean requireSsl)
void
setSessions(org.springframework.security.config.http.SessionCreationPolicy sessions)
Field Detail
ACCESS_OVERRIDE_ORDER
public static final int ACCESS_OVERRIDE_ORDER
Order before the basic authentication access control provided by Boot. This is a useful place to put user-defined access rules if you want to override the default access rules.- See Also:
- Constant Field Values
BASIC_AUTH_ORDER
public static final int BASIC_AUTH_ORDER
Order applied to the WebSecurityConfigurerAdapter that is used to configure basic authentication for application endpoints. If you want to add your own authentication for all or some of those endpoints the best thing to do is to add your own WebSecurityConfigurerAdapter with lower order.- See Also:
- Constant Field Values
IGNORED_ORDER
public static final int IGNORED_ORDER
Order applied to the WebSecurityConfigurer that ignores standard static resource paths.- See Also:
- Constant Field Values
DEFAULT_FILTER_ORDER
public static final int DEFAULT_FILTER_ORDER
Default order of Spring Security's Filter in the servlet container (i.e. amongst other filters registered with the container). There is no connection between this and the@Order
on a WebSecurityConfigurer.- See Also:
- Constant Field Values
Constructor Detail
SecurityProperties
public SecurityProperties()
Method Detail
getHeaders
public SecurityProperties.Headers getHeaders()
getUser
public SecurityProperties.User getUser()
getSessions
public org.springframework.security.config.http.SessionCreationPolicy getSessions()
setSessions
public void setSessions(org.springframework.security.config.http.SessionCreationPolicy sessions)
getBasic
public SecurityProperties.Basic getBasic()
setBasic
public void setBasic(SecurityProperties.Basic basic)
isRequireSsl
public boolean isRequireSsl()
setRequireSsl
public void setRequireSsl(boolean requireSsl)
isEnableCsrf
public boolean isEnableCsrf()
setEnableCsrf
public void setEnableCsrf(boolean enableCsrf)
setIgnored
public void setIgnored(List<String> ignored)
getIgnored
public List<String> getIgnored()
getFilterOrder
public int getFilterOrder()
setFilterOrder
public void setFilterOrder(int filterOrder)
getFilterDispatcherTypes
public Set<String> getFilterDispatcherTypes()
setFilterDispatcherTypes
public void setFilterDispatcherTypes(Set<String> filterDispatcherTypes)