Class SecurityConfig

java.lang.Object
ru.averkiev.socialmediaapi.configs.SecurityConfig

@Configuration @EnableWebSecurity public class SecurityConfig extends Object
Настройка конфигурации Spring Security.
Author:
mrGreenNV
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder
    Позволяет создать bean BCryptPasswordEncoder.
    org.springframework.security.web.SecurityFilterChain
    filterChain(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity)
    Позволяет выполнять фильтрацию endpoints, для ограничения аутентификации.

    Methods inherited from class java.lang.Object

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

    • SecurityConfig

      public SecurityConfig()
  • Method Details

    • filterChain

      @Bean public org.springframework.security.web.SecurityFilterChain filterChain(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity) throws Exception
      Позволяет выполнять фильтрацию endpoints, для ограничения аутентификации.
      Parameters:
      httpSecurity - Объект HttpSecurity для настройки безопасности.
      Returns:
      HttpSecurity с назначенными изменениями.
      Throws:
      Exception - выбрасывает, если при внесении изменений были допущены ошибки.
    • bCryptPasswordEncoder

      @Bean public org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder bCryptPasswordEncoder()
      Позволяет создать bean BCryptPasswordEncoder.
      Returns:
      новый объект BCryptPasswordEncoder.