Skip to content

Commit fca6a3d

Browse files
Retupn old ver SecurityConfig
1 parent ef9b305 commit fca6a3d

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[![Actions Status](https://github.com/VictorGotsenko/java-project-99/actions/workflows/hexlet-check.yml/badge.svg)](https://github.com/VictorGotsenko/java-project-99/actions)
2-
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=VictorGotsenko_java-project-99&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=VictorGotsenko_java-project-99)
2+
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=VictorGotsenko_java-project-99&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=VictorGotsenko_java-project-99)
33

44
## Task manager
55

src/main/java/hexlet/code/config/SecurityConfig.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,16 @@ public AuthenticationManager authenticationManager(HttpSecurity http) throws Exc
8181
.build();
8282
}
8383

84-
8584
/**
86-
* @param auth
85+
*
86+
* @param passwordEncoder
87+
* @param userService
8788
* @return AuthenticationProvider
8889
*/
89-
@Bean
90-
public AuthenticationProvider daoAuthProvider(AuthenticationManagerBuilder auth) {
91-
var provider = new DaoAuthenticationProvider(userService);
90+
public AuthenticationProvider daoAuthProvider(PasswordEncoder passwordEncoder,
91+
CustomUserDetailsService userService) {
92+
var provider = new DaoAuthenticationProvider();
93+
provider.setUserDetailsService(userService);
9294
provider.setPasswordEncoder(passwordEncoder);
9395
return provider;
9496
}

0 commit comments

Comments
 (0)