Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ganghee-Lee-0522 committed Jan 12, 2024
1 parent d36fb57 commit 2f9a531
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,13 @@ public void onAuthenticationSuccess(HttpServletRequest request, HttpServletRespo
// 로그인
CustomToken token = authService.setToken(optionalMember.get(), response);

/*
if (!isNew) { // 기가입 유저
memberService.refreshSnowflake(optionalMember.get());
}
*/

// Auth 컨트롤러로 리다이렉트
// 를 하지마
// String redirectUrl = UriComponentsBuilder.fromUriString("/api/auth/redirect")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public class CommitService {
@Transactional
public Long setSnowflake(OAuth2MemberDto memberDto) {

/*
log.info("첫 가입 시 눈송이 설정: setSnowflake");
log.info("memberDto -> {}", memberDto.getNickname());
Expand All @@ -56,5 +57,8 @@ public Long setSnowflake(OAuth2MemberDto memberDto) {
log.info("커밋 저장 되었는지 조회: commitRepository.findById -> {}", commitRepository.findById(commit.getId()));
return totalCommits;
*/
return 100L;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public HttpServletResponse login(HttpServletResponse response, String accessToke

public CustomToken setToken(Member member, HttpServletResponse response) {

/*
log.info("로그인 로직");
HashMap<String, String> m = new HashMap<>();
Expand All @@ -71,6 +72,12 @@ public CustomToken setToken(Member member, HttpServletResponse response) {
.build();
log.info("{}", token);
*/

CustomToken token = CustomToken.builder()
.accessToken("eyJhbGciOiJIUzI1NiJ9.eyJuaWNrbmFtZSI6IkdhbmdoZWUtTGVlLTA1MjIiLCJtZW1iZXJJZCI6MSwicm9sZSI6IlJPTEVfTUVNQkVSIiwiaWF0IjoxNzA1MDkwNjYwLCJleHAiOjE3MDc2ODI2NjB9.2O0vunX-WkIUI9oMDOdL9OnSz1sWuZzDiJTBdMdIkEk")
.refreshToken("eyJhbGciOiJIUzI1NiJ9.eyJuaWNrbmFtZSI6IkdhbmdoZWUtTGVlLTA1MjIiLCJtZW1iZXJJZCI6MSwicm9sZSI6IlJPTEVfTUVNQkVSIiwiaWF0IjoxNzA1MDkwNjYwLCJleHAiOjE3MDc2ODI2NjB9.2O0vunX-WkIUI9oMDOdL9OnSz1sWuZzDiJTBdMdIkEk")
.build();

return token;
}
Expand Down

0 comments on commit 2f9a531

Please sign in to comment.