Class SingleSignOnConfiguration


  • @AutoConfiguration
    @EnableWebSecurity
    @Conditional(org.springframework.boot.autoconfigure.security.oauth2.client.ClientsConfiguredCondition.class)
    @ConditionalOnProperty(name="auto-configure",
                           prefix="vaadin.sso",
                           matchIfMissing=true)
    @EnableConfigurationProperties(SingleSignOnProperties.class)
    public class SingleSignOnConfiguration
    extends com.vaadin.flow.spring.security.VaadinWebSecurity
    This configuration bean is provided to auto-configure Vaadin and Spring to allow single sign-on against external identity providers.

    It enables OAuth2/OpenID login for the identity providers defined in the current application configuration and instructs the application to accept requests for the login route, which can be configured setting the vaadin.sso.login-route property (defaults to /login).

    If you need a customized security configuration, you can disable this auto-configuration class by setting the vaadin.sso.auto-configure property to false and provide your own configuration class.

    Since:
    1.0
    Author:
    Vaadin Ltd
    • Constructor Summary

      Constructors 
      Constructor Description
      SingleSignOnConfiguration​(SingleSignOnProperties properties, org.springframework.security.core.session.SessionRegistry sessionRegistry, org.springframework.security.oauth2.client.registration.ClientRegistrationRepository clientRegistrationRepository)
      Creates an instance of this configuration bean.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void configure​(org.springframework.security.config.annotation.web.builders.HttpSecurity http)  
      • Methods inherited from class com.vaadin.flow.spring.security.VaadinWebSecurity

        addLogoutHandlers, applyUrlMapping, configure, filterChain, getAuthenticationContext, getDefaultHttpSecurityPermitMatcher, getDefaultHttpSecurityPermitMatcher, getDefaultWebSecurityIgnoreMatcher, getDefaultWebSecurityIgnoreMatcher, getViewAccessChecker, setLoginView, setLoginView, setLoginView, setLoginView, setOAuth2LoginPage, setStatelessAuthentication, setStatelessAuthentication, webSecurityCustomizer
    • Constructor Detail

      • SingleSignOnConfiguration

        public SingleSignOnConfiguration​(SingleSignOnProperties properties,
                                         org.springframework.security.core.session.SessionRegistry sessionRegistry,
                                         org.springframework.security.oauth2.client.registration.ClientRegistrationRepository clientRegistrationRepository)
        Creates an instance of this configuration bean.
        Parameters:
        properties - the configuration properties
        sessionRegistry - the session registry
        clientRegistrationRepository - the client-registration repository
    • Method Detail

      • configure

        protected void configure​(org.springframework.security.config.annotation.web.builders.HttpSecurity http)
                          throws Exception
        Overrides:
        configure in class com.vaadin.flow.spring.security.VaadinWebSecurity
        Throws:
        Exception