add log out
This commit is contained in:
parent
4b2787344a
commit
06eb2e8b12
@ -49,6 +49,7 @@ public class SecurityConfig {
|
||||
return http.csrf(AbstractHttpConfigurer::disable)
|
||||
.authorizeHttpRequests(auth -> auth.requestMatchers(new AntPathRequestMatcher("/api/auth")).permitAll()
|
||||
.anyRequest().authenticated())
|
||||
.logout((logout) -> logout.logoutUrl("/api/logout"))
|
||||
.httpBasic(Customizer.withDefaults())
|
||||
.build();
|
||||
}
|
||||
|
@ -15,7 +15,11 @@ public class EmployeeController {
|
||||
private final EmployeeService employeeService;
|
||||
|
||||
@GetMapping("/auth")
|
||||
public void EmployeeExists(@RequestParam final String login) {
|
||||
public void authEmployee(@RequestParam final String login) {
|
||||
employeeService.employeeExists(login);
|
||||
}
|
||||
@GetMapping("/logout")
|
||||
public void logoutEmployee(@RequestParam final String login) {
|
||||
employeeService.employeeExists(login);
|
||||
}
|
||||
@GetMapping("/info")
|
||||
|
Loading…
x
Reference in New Issue
Block a user