Skip to content

Commit

Permalink
Jwt Setting(#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jindongleee committed Oct 25, 2024
1 parent 8266eb6 commit 13ddd75
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ public SuccessResponse<String> testException() {

@GetMapping("/jwt-test")
public SuccessResponse<String> testJwt(Authentication authentication) {
return SuccessResponse.of(authentication.getName());
if (authentication == null) {
return SuccessResponse.of("token is null");
}
else{
return SuccessResponse.of(authentication.getName(),"알 수 없는 에러");
}
}
}

0 comments on commit 13ddd75

Please sign in to comment.