Class SingleSignOnConfiguration

java.lang.Object
com.vaadin.sso.starter.SingleSignOnConfiguration

@AutoConfiguration @AutoConfigureBefore(com.vaadin.flow.spring.SpringSecurityAutoConfiguration.class) @EnableWebSecurity @ConditionalOnOAuth2ClientRegistrationProperties @EnableConfigurationProperties(SingleSignOnProperties.class) @Import(com.vaadin.flow.spring.security.VaadinAwareSecurityContextHolderStrategyConfiguration.class) public class SingleSignOnConfiguration extends Object
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 adding its fully-qualified name to the spring.autoconfigure.exclude property 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, org.springframework.context.ApplicationEventPublisher eventPublisher)
    Creates an instance of this configuration bean.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.security.web.SecurityFilterChain
    vaadinSecurityFilterChain(org.springframework.security.config.annotation.web.builders.HttpSecurity http)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SingleSignOnConfiguration

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

    • vaadinSecurityFilterChain

      @Bean public org.springframework.security.web.SecurityFilterChain vaadinSecurityFilterChain(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws Exception
      Throws:
      Exception