Class AuthenticationConfig

    • Constructor Detail

      • AuthenticationConfig

        public AuthenticationConfig()
    • Method Detail

      • userDAO

        @Bean
        public UserDAO userDAO​(QueryUtil queryUtil,
                               QueryService queryService,
                               DataListService dataListService)
        Configure User detail service
        Parameters:
        queryUtil - Query utilities
        queryService - Query service
        dataListService - DataList service
        Returns:
        UserDetailService
      • aweUserDetailsService

        @Bean
        public org.springframework.security.core.userdetails.UserDetailsService aweUserDetailsService​(UserDAO userDAO)
        Configure User detail service
        Parameters:
        userDAO - User DAO
        Returns:
        User detail service
      • userDetailsContextMapper

        @Bean
        public org.springframework.security.ldap.userdetails.UserDetailsContextMapper userDetailsContextMapper​(org.springframework.security.core.userdetails.UserDetailsService userDetailService)
        Configure ldap user details mapper
        Parameters:
        userDetailService - user detail service
        Returns:
        Ldap user details context mapper
      • ldapContextSource

        @Bean
        @ConditionalOnMissingBean
        public org.springframework.ldap.core.support.LdapContextSource ldapContextSource​(SecurityConfigProperties securityConfigProperties)
        Spring context source for ldap connection
        Returns:
        Ldap context
      • ldapAuthenticationProvider

        @Bean
        @ConditionalOnProperty(prefix="awe.security",
                               name="auth-mode",
                               havingValue="ldap")
        public org.springframework.security.authentication.AuthenticationProvider ldapAuthenticationProvider​(org.springframework.ldap.core.support.LdapContextSource ldapContextSource,
                                                                                                             org.springframework.security.ldap.userdetails.UserDetailsContextMapper userDetailsContextMapper,
                                                                                                             SecurityConfigProperties securityConfigProperties)
        Configure Ldap provider for bind auth
        Parameters:
        ldapContextSource - Ldap context
        Returns:
        LDAP authentication provider
      • daoAuthenticationProvider

        @Bean
        @ConditionalOnProperty(prefix="awe.security",
                               name="auth-mode",
                               havingValue="bbdd",
                               matchIfMissing=true)
        public org.springframework.security.authentication.AuthenticationProvider daoAuthenticationProvider​(org.springframework.security.core.userdetails.UserDetailsService userDetailsService)
        Configure DAO authentication provider
        Returns:
        DaoAuthenticationProvider