From 11955a2986d92a66cc35be2cc1d11bf88c0595fe Mon Sep 17 00:00:00 2001 From: 1000kkannoo Date: Sun, 11 Aug 2024 18:42:12 +0900 Subject: [PATCH] =?UTF-8?q?feat=20:=20=EC=95=A0=ED=94=8C=20=EB=A1=9C?= =?UTF-8?q?=EA=B7=B8=EC=9D=B8=20API=20=EC=95=94=ED=98=B8=ED=99=94=20?= =?UTF-8?q?=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../backend/domain/account/service/AccountService.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/java/cmc15/backend/domain/account/service/AccountService.java b/src/main/java/cmc15/backend/domain/account/service/AccountService.java index 035407d..4ee3a84 100644 --- a/src/main/java/cmc15/backend/domain/account/service/AccountService.java +++ b/src/main/java/cmc15/backend/domain/account/service/AccountService.java @@ -56,6 +56,12 @@ public class AccountService { @Value("${apple.redirect-url}") private String appleRedirectUrl; + @Value("${oauth.password}") + private String oauthPassword; + + @Value("${oauth.non-encryption-password}") + private String nonEncryptionPassword; + public static final int FIX_AGE_DAY = 1; /** @@ -170,12 +176,12 @@ public HttpHeaders appleLogin(MultiValueMap request) { Account account = optionalAccount.orElseGet(() -> accountRepository.save(Account.builder() .email(appleEmail) - .password("$2a$10$7NPHBBkAuyWG/lJz6Yv8/.n099SecuAwWkQq4DMkxeVKWl/R7o5.2") + .password(oauthPassword) .authority(ROLE_USER) .build()) ); - String atk = tokenProvider.createAccessToken(account.getAccountId(), getAuthentication(account.getEmail(), "abc123")); + String atk = tokenProvider.createAccessToken(account.getAccountId(), getAuthentication(account.getEmail(), nonEncryptionPassword)); HttpHeaders headers = new HttpHeaders(); headers.setLocation(URI.create(appleRedirectUrl + atk +"&isRegister=" + optionalAccount.isPresent()));