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

Feat#11 #13

Merged
merged 15 commits into from
Jun 17, 2023
Merged

Feat#11 #13

merged 15 commits into from
Jun 17, 2023

Conversation

minnseong
Copy link
Contributor

πŸ’‘Β μ™œ PR을 ν•˜μ…¨λ‚˜μš”?

resolve #12

πŸ§‘β€πŸ’»Β μž‘μ—… 사항

  • JWTλ₯Ό μ‚¬μš©ν•œ 인증/인가
  • ꡬ글 μ†Œμ…œ 둜그인 κΈ°λŠ₯ κ΅¬ν˜„
  • 인증된 μ‚¬μš©μžμ— λŒ€ν•΄μ„œλ§Œ μ ‘κ·Ό κ°€λŠ₯ν•˜λ„λ‘ 채널 API μˆ˜μ •

πŸ”—Β λ§ν¬

πŸ°Β μ‹œκΈ‰ν•œ 정도

πŸ“–Β μ°Έκ³  사항

- Spring Security μ˜μ‘΄μ„± μΆ”κ°€
- SecurityConfig μ„€μ •
- User Entity
- UserController, UserService, UserRepository
- (email, password, nickname) λΆ€ν„° 자체 νšŒμ›κ°€μž… κ΅¬ν˜„
- jwt μ˜μ‘΄μ„± μΆ”κ°€
- accessToken, refreshToken에 λŒ€ν•œ λ©”μ„œλ“œ μΆ”κ°€
- Login ν•„ν„°/μ„œλΉ„μŠ€ κ΅¬ν˜„
- Login 성곡/μ‹€νŒ¨ ν•Έλ“€λŸ¬ κ΅¬ν˜„
- JWT μ„€μ • 파일 μΆ”κ°€
- PasswordEncoder 쀑볡 μ£Όμž… ν•΄κ²°
- request.getRequestURL() -> request.getRequestURI()
- νšŒμ›κ°€μž…μ‹œ, ROLE μ„€μ •
- oauth μ˜μ‘΄μ„± μΆ”κ°€
- application-oauth.yml μΆ”κ°€
- CustomOAuth2UserService
- GoogleOAuth2UserInfo
- SecurityConfig OAuth2 μΆ”κ°€
- application μˆ˜μ •
- @transaction μ—†μ–΄ λ³€κ²½ 감지가 μΌμ–΄λ‚˜μ§€ μ•ŠμŒ.
- Get /jwt-test ν…ŒμŠ€νŠΈ
- casting User to UserDetails 버그 μˆ˜μ •
- μ†Œμ…œ 둜그인 이후 μΆ”κ°€λ‘œ μž…λ ₯ν•  정보가 μ—†μ–΄ ROLE을 USER둜 μ„€μ •
@minnseong minnseong requested a review from isieun0908 June 1, 2023 18:52
@choiyunh choiyunh self-requested a review June 3, 2023 09:15
- μ΄μ „μ—λŠ” 더미 μœ μ €λ₯Ό λ°”νƒ•μœΌλ‘œ 채널 APIκ°€ λ™μž‘ν–ˆλ”λΌλ©΄,
- μ‹€μ œλ‘œ 인증/인가 절차 이후 λ™μž‘ν•  수 μžˆλ„λ‘ μˆ˜μ •
- CORS 문제 ν•΄κ²°
Comment on lines +46 to +48
/**
* AccessToken 생성 λ©”μ„œλ“œ
*/
Copy link
Member

Choose a reason for hiding this comment

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

ν•¨μˆ˜λͺ…이 μΆ©λΆ„νžˆ 직관적이라 주석이 없어도 λ˜μ§€ μ•Šμ„κΉŒμš© ??


password.append(charSet[index]);
}
System.out.println(password);
Copy link
Member

Choose a reason for hiding this comment

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

μ‚­μ œν•΄λ„ λ˜λŠ” 라인인 것 κ°™μ•„μš©

Copy link
Contributor Author

Choose a reason for hiding this comment

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

κ·Έλ ‡λ„€μš”!! μˆ˜μ •ν•˜κ² μŠ΅λ‹ˆλ‹€!!

'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'
};

StringBuffer password = new StringBuffer();
Copy link
Member

Choose a reason for hiding this comment

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

λ©€ν‹° μŠ€λ ˆλ“œ ν™˜κ²½μ— 동기화λ₯Ό κ³ λ €ν•΄μ„œ StringBuilderλŒ€μ‹  StringBuffer μ‚¬μš©ν•˜μ‹  κ±΄κ°€μš©?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

λ„€! μ†Œμ…œ 둜그인 μ‹œ 랜덀된 λΉ„λ°€λ²ˆν˜Έλ₯Ό λ§Œλ“€μ–΄μ£ΌλŠ” λ©”μ„œλ“œμ΄κΈ° λ•Œλ¬Έμ—, λ©€ν‹° μ“°λ ˆλ“œ ν™˜κ²½μ„ κ³ λ €ν•˜μ—¬ StringBufferλ₯Ό μ‚¬μš©ν•˜μ˜€μŠ΅λ‹ˆλ‹€.

if (!channel.getUser().getEmail().equals(email)) {
throw new UserHasNotPermission();
}

// User κΆŒν•œ 체크
channelRepository.delete(channel);
Copy link
Member

Choose a reason for hiding this comment

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

soft delete에 λŒ€ν•΄ 같이 μ–˜κΈ°ν•΄λ³΄λ©΄ 쒋을 것 κ°™μ•„μš”

Copy link
Contributor Author

Choose a reason for hiding this comment

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

μ§€λ‹Ήν•œ μ˜κ²¬μž…λ‹ˆλ‹€.
soft deleteλ₯Ό ν†΅ν•΄μ„œ μ‚­μ œλœ 데이터도 μœ μ§€ν•΄λ†“λŠ” 것도 맀우 μ€‘μš”ν•˜λ‹€κ³  μƒκ°ν•©λ‹ˆλ‹€.
λ°±μ—”λ“œ νŒ€μ›μ΄λž‘ μ–˜κΈ°ν•΄μ„œ λ³€κ²½ν•΄λ³΄κ² μŠ΅λ‹ˆλ‹€.

@@ -0,0 +1,5 @@
package devteamOne.classmate.user.domain;

public enum SocialType {
Copy link
Member

Choose a reason for hiding this comment

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

ν™•μž₯성에 λŒ€ν•΄ 같이 μ–˜κΈ°ν•΄λ³΄λ©΄ 쒋을 것 κ°™μ•„μš”

@minnseong minnseong merged commit 28bb1ca into develop Jun 17, 2023
@minnseong minnseong deleted the feat#11 branch June 17, 2023 07:16
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.

2 participants