Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auth 회원가입 및 로그인 기능 구현 #16

Open
wants to merge 27 commits into
base: develop
Choose a base branch
from

Conversation

yeeunli
Copy link
Collaborator

@yeeunli yeeunli commented Jan 22, 2025

No description provided.

@yeeunli
Copy link
Collaborator Author

yeeunli commented Jan 22, 2025

엇 spotless 주석 처리된 걸로 올라가버렸네요,,


private String password;
private String refresh;
private String expiration;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

토큰 만료시간 같은데 LocalDateTime 이런걸로 안해도 되나요?
(진짜 모름)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

덕분에 찾아봤는데, 보통 Long이나 String을 추천한다고 하네용

Auth auth = Auth.builder()
.member(member)
.password(bCryptPasswordEncoder.encode(joinDto.password()))
.role("ROLE_USER")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

혹시 이건 어떤 role 인가요? 일반 회원과 운영진인가여
그리고 enum 으로 따로 관리하면 어떨까요

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

네, 일반 유저와 관리자입니다.
enum으로 바꿀게요.

@yeeunli yeeunli changed the title Auth 회원가입 기능 구현 Auth 회원가입 및 로그인 기능 구현 Jan 28, 2025
@yeeunli
Copy link
Collaborator Author

yeeunli commented Jan 28, 2025

refresh token 발급 기능 추가 후, 다시 올릴 예정입니다

@yeeunli
Copy link
Collaborator Author

yeeunli commented Feb 13, 2025

참고

8c414a8 로직 오류가 있어서 3e28c1d에서 수정해두었습니다.

Copy link
Collaborator

@JaehoonJung0430 JaehoonJung0430 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

커멘트

build.gradle Outdated
endWithNewline()
}
}
//spotless {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spotless 설정 주석 처리 한 이유가 뭔가요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

덕분에 다시 돌려놓았습니다

cookie.setMaxAge(expiredS); // 쿠키 생명 주기
cookie.setPath("/"); // 쿠키가 적용되는 범위
cookie.setHttpOnly(true); // 클라이언트 측의 JS로 쿠키에 접근하지 못하게 막기 (XSS 방지)
// cookie.setSecure(true); // HTTPS 통신 시, 필수
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

주석 하고
// cookie.setSecure(true); // TODO: HTTPS 설정 후 주석 제거하기
이런 식으로 투두 달아두면 나중에 배포 후 https 설정 하고 나중에 알아보기 쉽지 않을까요

});

return collection;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@OverRide
public Collection<? extends GrantedAuthority> getAuthorities() {
return List.of(() -> authInfoDto.role());
}
이런 식으로 바꾸는건 어떨까요? 가독성이나 불변성 측면에서..
민재님의 판단도 듣고싶어요

근데 사실 굳이 안바꿔도 상관은 없을 것 같아요

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants