Class BaseSecurityConfig

java.lang.Object
at.jku.dke.etutor.task_app.config.BaseSecurityConfig

Base class for security configuration.

Override this class and add the Configuration annotation to the subclass.

This class configures the following:

  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Creates a new instance of class BaseSecurityConfig.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    additionalFilterChainCustomization(org.springframework.security.config.annotation.web.builders.HttpSecurity http)
    Override this method to customize the security filter chain.
    protected void
    additionalHttpRequestAuthorizationCustomization(org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer<org.springframework.security.config.annotation.web.builders.HttpSecurity>.org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer.AuthorizationManagerRequestMatcherRegistry registry)
    Override this method to configure additional HTTP request authorizations.
    org.springframework.security.web.SecurityFilterChain
    filterChain(org.springframework.security.config.annotation.web.builders.HttpSecurity http, AuthenticationService authenticationService)
    Configures the applications' security filter chain.

    Methods inherited from class java.lang.Object

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

    • BaseSecurityConfig

      protected BaseSecurityConfig()
      Creates a new instance of class BaseSecurityConfig.
  • Method Details

    • filterChain

      @Bean public org.springframework.security.web.SecurityFilterChain filterChain(org.springframework.security.config.annotation.web.builders.HttpSecurity http, AuthenticationService authenticationService) throws Exception
      Configures the applications' security filter chain.
      Parameters:
      http - The HTTP security configuration.
      authenticationService - The authentication service.
      Returns:
      The security filter chain.
      Throws:
      Exception - If the configuration fails.
    • additionalHttpRequestAuthorizationCustomization

      protected void additionalHttpRequestAuthorizationCustomization(org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer<org.springframework.security.config.annotation.web.builders.HttpSecurity>.org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer.AuthorizationManagerRequestMatcherRegistry registry)
      Override this method to configure additional HTTP request authorizations.
      Parameters:
      registry - The request matcher registry.
    • additionalFilterChainCustomization

      protected void additionalFilterChainCustomization(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws Exception
      Override this method to customize the security filter chain.
      Parameters:
      http - The HTTP security configuration.
      Throws:
      Exception - If the customization fails.