Class SecurityConfig

java.lang.Object
com.erudika.para.server.security.SecurityConfig

@Configuration @EnableWebSecurity @DeclareRoles({"ROLE_USER","ROLE_MOD","ROLE_ADMIN","ROLE_APP"}) public class SecurityConfig extends Object
Programmatic configuration for Spring Security.
Author:
Alex Bogdanovski [[email protected]]
  • Constructor Summary

    Constructors
    Constructor
    Description
    No-args constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.security.web.SecurityFilterChain
    filterChain(org.springframework.security.config.annotation.web.builders.HttpSecurity http)
    Configures the protected private resources.
    org.springframework.security.config.annotation.web.configuration.WebSecurityCustomizer
    Configures the unsecured public resources.

    Methods inherited from class java.lang.Object

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

    • SecurityConfig

      public SecurityConfig()
      No-args constructor.
  • Method Details

    • webSecurityCustomizer

      @Bean public org.springframework.security.config.annotation.web.configuration.WebSecurityCustomizer webSecurityCustomizer()
      Configures the unsecured public resources.
      Returns:
      web
    • filterChain

      @Bean public org.springframework.security.web.SecurityFilterChain filterChain(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws Exception
      Configures the protected private resources.
      Parameters:
      http - HTTP sec object
      Returns:
      http
      Throws:
      Exception - ex