Class SecurityConfig
java.lang.Object
ru.averkiev.socialmediaapi.configs.SecurityConfig
Настройка конфигурации Spring Security.
- Author:
- mrGreenNV
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.crypto.bcrypt.BCryptPasswordEncoder
Позволяет создать bean BCryptPasswordEncoder.org.springframework.security.web.SecurityFilterChain
filterChain
(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity) Позволяет выполнять фильтрацию endpoints, для ограничения аутентификации.
-
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.
-