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
Nested ClassesModifier and TypeClassDescriptionprotected static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.vaadin.flow.spring.VaadinConfigurationPropertiesprotected FlowuiPropertiesstatic final Stringstatic final Stringprotected com.vaadin.flow.spring.security.RequestUtilprotected FlowuiScreenAccessCheckerprotected ScreenRegistryprotected com.vaadin.flow.spring.security.VaadinDefaultRequestCache -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapplyUrlMapping(String path) Prepends to the givenpathwith the configured url mapping.static StringapplyUrlMapping(String urlMapping, String path) Prepends to the givenpathwith the servlet path prefix from input url mapping.protected voidconfigure(org.springframework.security.config.annotation.web.builders.HttpSecurity http) voidconfigure(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.AccessDeniedHandlerprotected org.springframework.security.web.util.matcher.RequestMatchercreateLogoutRequestMatcher(String logoutUrl) protected org.springframework.security.web.util.matcher.RequestMatchercreateLogoutRequestMatcher(String logoutUrl, String httpMethod) protected com.vaadin.flow.spring.security.VaadinSavedRequestAwareAuthenticationSuccessHandlercreateSuccessHandler(org.springframework.security.config.annotation.web.builders.HttpSecurity http) static org.springframework.security.web.util.matcher.RequestMatchergetDefaultHttpSecurityPermitMatcher(String urlMapping) Matcher for framework internal requests, with Vaadin servlet mapped on the given path.static org.springframework.security.web.util.matcher.RequestMatchergetDefaultWebSecurityIgnoreMatcher(String urlMapping) Matcher for Vaadin static (public) resources, with Vaadin servlet mapped on the given path.protected voidinitLoginScreen(org.springframework.security.config.annotation.web.builders.HttpSecurity http) voidsetConfigurationProperties(com.vaadin.flow.spring.VaadinConfigurationProperties configurationProperties) voidsetFlowuiProperties(FlowuiProperties flowuiProperties) protected voidsetLoginScreen(org.springframework.security.config.annotation.web.builders.HttpSecurity http, Class<? extends com.vaadin.flow.component.Component> screenClass) protected voidsetLoginScreen(org.springframework.security.config.annotation.web.builders.HttpSecurity http, Class<? extends com.vaadin.flow.component.Component> screenClass, String logoutUrl) protected voidsetLoginScreen(org.springframework.security.config.annotation.web.builders.HttpSecurity http, String screenId) protected voidsetLoginScreen(org.springframework.security.config.annotation.web.builders.HttpSecurity http, String screenId, String logoutUrl) voidsetRequestUtil(com.vaadin.flow.spring.security.RequestUtil requestUtil) voidsetScreenAccessChecker(FlowuiScreenAccessChecker screenAccessChecker) voidsetScreenRegistry(ScreenRegistry screenRegistry) voidsetVaadinDefaultRequestCache(com.vaadin.flow.spring.security.VaadinDefaultRequestCache vaadinDefaultRequestCache) Methods inherited from class io.jmix.security.StandardSecurityConfiguration
authenticationManagerBean, configureMethods 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:
configurein interfaceorg.springframework.security.config.annotation.SecurityConfigurer<javax.servlet.Filter,org.springframework.security.config.annotation.web.builders.WebSecurity> - Overrides:
configurein 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:
configurein 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
HttpSecuritybypass 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
WebSecurityignore 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 givenpathwith the configured url mapping.A
nullpath 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 givenpathwith the servlet path prefix from input url mapping.A
nullpath is treated as empty string; the same applies for url mapping.- Returns:
- the path with prepended url mapping.
- See Also:
-
VaadinConfigurationProperties.getUrlMapping()
-