Class SecurityConfig

    • Constructor Detail

      • SecurityConfig

        @Autowired
        public SecurityConfig​(SecurityConfigProperties securityConfigProperties)
        Autowired constructor
        Parameters:
        securityConfigProperties - Security configuration properties
    • Method Detail

      • configureGlobal

        @Autowired
        public void configureGlobal​(org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder auth)
        Configure current users datasource
        Parameters:
        auth - Authentication manager
      • loginAccessControl

        @Bean
        @ConditionalOnMissingBean
        public LoginAccessControl loginAccessControl()
        Get access control bean to use in the configuration method
        Returns:
        Login access control
      • accessService

        @Bean
        @ConditionalOnMissingBean
        public AccessService accessService​(AweSessionDetails aweSessionDetails,
                                           MenuService menuService,
                                           EncodeService encodeService,
                                           TotpService totpService,
                                           BaseConfigProperties baseConfigProperties,
                                           SecurityConfigProperties securityConfigProperties,
                                           TotpConfigProperties totpConfigProperties)
        Access service bean
        Parameters:
        menuService - Menu service
        aweSessionDetails - Awe session details
        encodeService - Encode service
        totpService - Totp service
        baseConfigProperties - Base config properties
        securityConfigProperties - Security config properties
        totpConfigProperties - Totp config properties
        Returns:
        AccessService bean
      • totpService

        @Bean
        @ConditionalOnMissingBean
        public TotpService totpService​(dev.samstevens.totp.secret.SecretGenerator secretGenerator,
                                       dev.samstevens.totp.qr.QrDataFactory qrDataFactory,
                                       dev.samstevens.totp.qr.QrGenerator qrGenerator,
                                       dev.samstevens.totp.code.CodeVerifier codeVerifier)
        Totp service
        Parameters:
        secretGenerator - Secret generator
        qrDataFactory - QR data factory
        qrGenerator - QR Generator
        codeVerifier - TOTP Code verifier
        Returns:
        TOTP Service