Skip to content

Commit

Permalink
🐛 Implement Email Certification
Browse files Browse the repository at this point in the history
Related: #5
  • Loading branch information
L-U-Ready committed Oct 11, 2024
1 parent 99e53bc commit 0c4f1f9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class JwtProvider {
public JwtProvider(@Value("${jwt.secret_key}") String secretKey,
@Value("${jwt.access_token_expire}") Long accessTokenExpire,
@Value("${jwt.refresh_token_expire}") Long refreshTokenExpire) {
this.key = Keys.hmacShaKeyFor(Decoders.BASE64.decode(secretKey));
this.key = Keys.secretKeyFor(SignatureAlgorithm.HS256); // 안전한 256비트 비밀 키 생성
this.ACCESS_TOKEN_EXPIRE_TIME = accessTokenExpire;
this.REFRESH_TOKEN_EXPIRE_TIME = refreshTokenExpire;
}
Expand Down
12 changes: 7 additions & 5 deletions src/main/java/the_monitor/presentation/AccountController.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@ public void verifyEmail(@RequestParam("certifiedKey") String certifiedKey, HttpS
accountService.verifyEmail(certifiedKey, response);

}

@GetMapping("/sendVerificationEmail")
public ApiResponse<String> sendVerificationEmail(@RequestParam("email") String email) {
return ApiResponse.onSuccess(accountService.sendVerificationEmail(email));
}
//
// @GetMapping("/sendVerificationEmail")
// public ApiResponse<String> sendVerificationEmail(@RequestParam("email") String email) {
//
// return ApiResponse.onSuccess(accountService.sendVerificationEmail(email));
//
// }



Expand Down

0 comments on commit 0c4f1f9

Please sign in to comment.