Package io.jmix.securityflowui
Class FlowuiSecurityConfiguration
java.lang.Object
org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
io.jmix.security.StandardSecurityConfiguration
io.jmix.securityflowui.FlowuiSecurityConfiguration
- All Implemented Interfaces:
org.springframework.security.config.annotation.SecurityConfigurer<javax.servlet.Filter,
,org.springframework.security.config.annotation.web.builders.WebSecurity> org.springframework.security.config.annotation.web.WebSecurityConfigurer<org.springframework.security.config.annotation.web.builders.WebSecurity>
- Direct Known Subclasses:
SecurityFlowuiAutoConfiguration.DefaultFlowuiSecurityConfiguration
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
-
Field Summary
Modifier and TypeFieldDescriptionprotected com.vaadin.flow.spring.VaadinConfigurationProperties
protected FlowuiProperties
static final String
static final String
protected com.vaadin.flow.spring.security.RequestUtil
protected FlowuiScreenAccessChecker
protected ScreenRegistry
protected com.vaadin.flow.spring.security.VaadinDefaultRequestCache
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionapplyUrlMapping
(String path) Prepends to the givenpath
with the configured url mapping.static String
applyUrlMapping
(String urlMapping, String path) Prepends to the givenpath
with the servlet path prefix from input url mapping.protected void
configure
(org.springframework.security.config.annotation.web.builders.HttpSecurity http) void
configure
(org.springframework.security.config.annotation.web.builders.WebSecurity web) The paths listed as "ignoring" in this method are handled without any Spring Security involvement.protected org.springframework.security.web.access.AccessDeniedHandler
protected org.springframework.security.web.util.matcher.RequestMatcher
createLogoutRequestMatcher
(String logoutUrl) protected org.springframework.security.web.util.matcher.RequestMatcher
createLogoutRequestMatcher
(String logoutUrl, String httpMethod) protected com.vaadin.flow.spring.security.VaadinSavedRequestAwareAuthenticationSuccessHandler
createSuccessHandler
(org.springframework.security.config.annotation.web.builders.HttpSecurity http) static org.springframework.security.web.util.matcher.RequestMatcher
getDefaultHttpSecurityPermitMatcher
(String urlMapping) Matcher for framework internal requests, with Vaadin servlet mapped on the given path.static org.springframework.security.web.util.matcher.RequestMatcher
getDefaultWebSecurityIgnoreMatcher
(String urlMapping) Matcher for Vaadin static (public) resources, with Vaadin servlet mapped on the given path.protected void
initLoginScreen
(org.springframework.security.config.annotation.web.builders.HttpSecurity http) void
setConfigurationProperties
(com.vaadin.flow.spring.VaadinConfigurationProperties configurationProperties) void
setFlowuiProperties
(FlowuiProperties flowuiProperties) protected void
setLoginScreen
(org.springframework.security.config.annotation.web.builders.HttpSecurity http, Class<? extends com.vaadin.flow.component.Component> screenClass) protected void
setLoginScreen
(org.springframework.security.config.annotation.web.builders.HttpSecurity http, Class<? extends com.vaadin.flow.component.Component> screenClass, String logoutUrl) protected void
setLoginScreen
(org.springframework.security.config.annotation.web.builders.HttpSecurity http, String screenId) protected void
setLoginScreen
(org.springframework.security.config.annotation.web.builders.HttpSecurity http, String screenId, String logoutUrl) void
setRequestUtil
(com.vaadin.flow.spring.security.RequestUtil requestUtil) void
setScreenAccessChecker
(FlowuiScreenAccessChecker screenAccessChecker) void
setScreenRegistry
(ScreenRegistry screenRegistry) void
setVaadinDefaultRequestCache
(com.vaadin.flow.spring.security.VaadinDefaultRequestCache vaadinDefaultRequestCache) Methods inherited from class io.jmix.security.StandardSecurityConfiguration
authenticationManagerBean, configure
Methods inherited from class org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
authenticationManager, getApplicationContext, getHttp, init, setApplicationContext, setAuthenticationConfiguration, setContentNegotationStrategy, setObjectPostProcessor, setTrustResolver, userDetailsService, userDetailsServiceBean
-
Field Details
-
LOGOUT_URL
- See Also:
-
LOGOUT_SUCCESS_URL
- See Also:
-
vaadinDefaultRequestCache
protected com.vaadin.flow.spring.security.VaadinDefaultRequestCache vaadinDefaultRequestCache -
configurationProperties
protected com.vaadin.flow.spring.VaadinConfigurationProperties configurationProperties -
requestUtil
protected com.vaadin.flow.spring.security.RequestUtil requestUtil -
screenAccessChecker
-
flowuiProperties
-
screenRegistry
-
-
Constructor Details
-
FlowuiSecurityConfiguration
public FlowuiSecurityConfiguration()
-
-
Method Details
-
setVaadinDefaultRequestCache
@Autowired public void setVaadinDefaultRequestCache(com.vaadin.flow.spring.security.VaadinDefaultRequestCache vaadinDefaultRequestCache) -
setConfigurationProperties
@Autowired public void setConfigurationProperties(com.vaadin.flow.spring.VaadinConfigurationProperties configurationProperties) -
setRequestUtil
@Autowired public void setRequestUtil(com.vaadin.flow.spring.security.RequestUtil requestUtil) -
setScreenAccessChecker
-
setFlowuiProperties
-
setScreenRegistry
-
configure
public void configure(org.springframework.security.config.annotation.web.builders.WebSecurity web) throws Exception The paths listed as "ignoring" in this method are handled without any Spring Security involvement. They have no access to any security context etc.- Specified by:
configure
in interfaceorg.springframework.security.config.annotation.SecurityConfigurer<javax.servlet.Filter,
org.springframework.security.config.annotation.web.builders.WebSecurity> - Overrides:
configure
in classorg.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
- Throws:
Exception
-
configure
protected void configure(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws Exception - Overrides:
configure
in classStandardSecurityConfiguration
- Throws:
Exception
-
initLoginScreen
protected void initLoginScreen(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws Exception - Throws:
Exception
-
getDefaultHttpSecurityPermitMatcher
public static org.springframework.security.web.util.matcher.RequestMatcher getDefaultHttpSecurityPermitMatcher(String urlMapping) Matcher for framework internal requests, with Vaadin servlet mapped on the given path.- Parameters:
urlMapping
- url mapping for the Vaadin servlet.- Returns:
- default
HttpSecurity
bypass matcher
-
getDefaultWebSecurityIgnoreMatcher
public static org.springframework.security.web.util.matcher.RequestMatcher getDefaultWebSecurityIgnoreMatcher(String urlMapping) Matcher for Vaadin static (public) resources, with Vaadin servlet mapped on the given path.Assumes Vaadin servlet to be mapped on root path (/*).
- Parameters:
urlMapping
- the url mapping for the Vaadin servlet- Returns:
- default
WebSecurity
ignore matcher
-
setLoginScreen
protected void setLoginScreen(org.springframework.security.config.annotation.web.builders.HttpSecurity http, String screenId) throws Exception - Throws:
Exception
-
setLoginScreen
protected void setLoginScreen(org.springframework.security.config.annotation.web.builders.HttpSecurity http, String screenId, String logoutUrl) throws Exception - Throws:
Exception
-
setLoginScreen
protected void setLoginScreen(org.springframework.security.config.annotation.web.builders.HttpSecurity http, Class<? extends com.vaadin.flow.component.Component> screenClass) throws Exception - Throws:
Exception
-
setLoginScreen
protected void setLoginScreen(org.springframework.security.config.annotation.web.builders.HttpSecurity http, Class<? extends com.vaadin.flow.component.Component> screenClass, String logoutUrl) throws Exception - Throws:
Exception
-
createLogoutRequestMatcher
protected org.springframework.security.web.util.matcher.RequestMatcher createLogoutRequestMatcher(String logoutUrl) -
createLogoutRequestMatcher
-
createSuccessHandler
protected com.vaadin.flow.spring.security.VaadinSavedRequestAwareAuthenticationSuccessHandler createSuccessHandler(org.springframework.security.config.annotation.web.builders.HttpSecurity http) -
createAccessDeniedHandler
protected org.springframework.security.web.access.AccessDeniedHandler createAccessDeniedHandler() -
getUrlMapping
-
applyUrlMapping
Prepends to the givenpath
with the configured url mapping.A
null
path is treated as empty string; the same applies for url mapping.- Returns:
- the path with prepended url mapping.
- See Also:
-
VaadinConfigurationProperties.getUrlMapping()
-
applyUrlMapping
Prepends to the givenpath
with the servlet path prefix from input url mapping.A
null
path is treated as empty string; the same applies for url mapping.- Returns:
- the path with prepended url mapping.
- See Also:
-
VaadinConfigurationProperties.getUrlMapping()
-