File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 12
12
import land .leets .global .jwt .JwtProvider ;
13
13
import land .leets .global .jwt .dto .JwtResponse ;
14
14
import lombok .RequiredArgsConstructor ;
15
- import lombok .extern .slf4j .Slf4j ;
16
- import org .springframework .web .bind .annotation .*;
15
+ import org .springframework .http .HttpStatus ;
16
+ import org .springframework .http .ResponseEntity ;
17
+ import org .springframework .web .bind .annotation .GetMapping ;
18
+ import org .springframework .web .bind .annotation .RequestParam ;
19
+ import org .springframework .web .bind .annotation .RestController ;
17
20
18
21
import java .io .IOException ;
19
22
import java .security .GeneralSecurityException ;
20
23
21
24
@ RestController
22
25
@ RequiredArgsConstructor
23
- @ Slf4j
24
26
public class AuthController {
25
27
private final AuthService authService ;
26
28
private final JwtProvider jwtProvider ;
@@ -40,4 +42,9 @@ public JwtResponse get(@RequestParam("code") String code) throws GeneralSecurity
40
42
41
43
return new JwtResponse (accessToken , refreshToken );
42
44
}
45
+
46
+ @ GetMapping ("/health-check" )
47
+ public ResponseEntity <Void > checkHealthStatus () {
48
+ return new ResponseEntity <>(HttpStatus .OK );
49
+ }
43
50
}
Original file line number Diff line number Diff line change @@ -51,6 +51,9 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
51
51
http
52
52
.authorizeHttpRequests ()
53
53
.requestMatchers (CorsUtils ::isCorsRequest ).permitAll ()
54
+
55
+ .requestMatchers (HttpMethod .GET ,"/health-check" ).permitAll ()
56
+
54
57
.requestMatchers ("/v3/api-docs/**" , "/swagger-ui/**" ).permitAll ()
55
58
56
59
.requestMatchers ("/oauth2/**" , "/auth/**" ).permitAll ()
@@ -71,6 +74,9 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
71
74
.requestMatchers (HttpMethod .GET ,"/application/**" ).hasAuthority (AuthRole .ROLE_ADMIN .getRole ())
72
75
.requestMatchers (HttpMethod .PATCH ,"/application/**" ).hasAuthority (AuthRole .ROLE_ADMIN .getRole ())
73
76
77
+ .requestMatchers (HttpMethod .GET ,"/interview" ).permitAll ()
78
+ .requestMatchers (HttpMethod .PATCH ,"/interview/**" ).hasAuthority (AuthRole .ROLE_ADMIN .getRole ())
79
+
74
80
.requestMatchers (HttpMethod .POST ,"/mail/**" ).hasAuthority (AuthRole .ROLE_ADMIN .getRole ())
75
81
76
82
.anyRequest ().authenticated ();
You can’t perform that action at this time.
0 commit comments