close

Filter

loading table of contents...

Studio Developer Manual / Version 2406.0

Table Of Contents

11.3.2 Create your own AutoConfiguration

We recommend to create a new Maven module with a new AutoConfiguration class. The module needs a compile-dependency on editing-rest-security-component and of course has to be added to the application by adding a dependency on it, e.g. in the studio-blueprint-component module.

The AutoConfiguration class should then look like this:

        @AutoConfiguration
@EnableWebSecurity
@Import(com.coremedia.rest.security.config.EditingRestSecurityBaseConfiguration.class)
public class MySsoAutoConfiguration {
   ...
}

      

@EnableWebSecurity is necessary for customizing the Spring Security configuration and the import of EditingRestSecurityBaseConfiguration adds some beans that are used in the authentication process and some that are used by your custom SecurityFilterChain.

Do not forget to expose your new class as AutoConfiguration by adding a Spring imports file at src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports containing the fully qualified name of your AutoConfiguration class.

In the next sections we will go through the beans that you will create in this Configuration class: The securityFilterChain and the springSecurityCapUserFinder.

Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.