All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.zodiac.autoconfigure.security.http.reactive.SecurityRegistryReactiveAutoConfiguration Maven / Gradle / Ivy

There is a newer version: 1.6.8
Show newest version
package org.zodiac.autoconfigure.security.http.reactive;

import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type;
import org.springframework.context.annotation.Bean;
import org.springframework.core.annotation.Order;
import org.zodiac.autoconfigure.security.condition.ConditionalOnSecurityHttpEnabled;
import org.zodiac.autoconfigure.security.http.SecurityHttpProperties;

@Order
@SpringBootConfiguration
@ConditionalOnSecurityHttpEnabled
@ConditionalOnWebApplication(type = Type.REACTIVE)
@AutoConfigureBefore(value = {SecurityHttpReactiveAutoConfiguration.class})
@ConditionalOnClass(value = {org.springframework.jdbc.core.JdbcTemplate.class, org.zodiac.security.registry.SecurityRegistry.class})
public class SecurityRegistryReactiveAutoConfiguration {

    private final org.springframework.jdbc.core.JdbcTemplate jdbcTemplate;

    public SecurityRegistryReactiveAutoConfiguration(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate) {
        this.jdbcTemplate = jdbcTemplate;
    }

    @Bean
    @ConditionalOnMissingBean
    protected org.zodiac.security.registry.SecurityRegistry securityRegistry() {
        return new org.zodiac.security.registry.SecurityRegistry();
    }

    @Bean
    @ConditionalOnMissingBean(value = org.zodiac.security.http.SecurityHandler.class)
    protected org.zodiac.security.http.reactive.ReactiveSecurityHandler securityHandler(org.zodiac.security.registry.SecurityRegistry securityRegistry,
        SecurityHttpProperties securityHttpProperties) {
        return new org.zodiac.security.http.reactive.ReactiveSecurityHandlerHandler(securityRegistry, securityHttpProperties);
    }

    @Bean
    @ConditionalOnMissingBean
    protected org.zodiac.security.handler.PermissionHandler permissionHandler() {
        return new org.zodiac.security.handler.PlatformPermissionReactiveHandler(jdbcTemplate);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy