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

#270 [fix] /authorize 명세 수정 #271

Merged
merged 5 commits into from
Jun 26, 2024
Merged

#270 [fix] /authorize 명세 수정 #271

merged 5 commits into from
Jun 26, 2024

Conversation

KWY0218
Copy link
Contributor

@KWY0218 KWY0218 commented Jun 25, 2024

Related Issue 🚀

Work Description ✏️

  • redirect uri를 웹 로컬에 저장함으로써 웹은 로컬 관리까지 수반됐습니다.
    플랫폼 인가코드와 함께 리다이렉션 uri를 합쳐서 redirect url 형태로 넘겨주면서 웹의 부담을 줄이기로 결정했습니다.

KWY0218 added 4 commits June 26, 2024 01:40
api 문서 수정으로 redirect url을 반환함에 따라 dto 수정
redirect url template을 상수로 만들어서
redirect uri와 platformCode를 redirctUrl 형태로 만든다
@KWY0218 KWY0218 requested review from yeseul106 and yummygyudon June 25, 2024 16:46
@KWY0218 KWY0218 self-assigned this Jun 25, 2024
@KWY0218 KWY0218 linked an issue Jun 25, 2024 that may be closed by this pull request
1 task
Copy link

height bot commented Jun 25, 2024

This pull request has been linked to 1 task:

💡Tip: Add "Close T-10863" to the pull request title or description, to a commit message, or in a comment to mark this task as "DEV Done" when the pull request is merged.

Copy link
Member

@yummygyudon yummygyudon left a comment

Choose a reason for hiding this comment

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

큰 추가/변경사항은 없는 것 같아보여요!!
코드에 대한 리뷰는 이정도로 마치겠습니다!!

고생하셨어요!! ☺️

@RestController
@RequiredArgsConstructor
@RequestMapping("/api/v1/auth")
public class AuthApiController implements AuthApi {

private static final String AUTHORIZATION_CODE_GRANT_TYPE = "authorizationCode";
private static final String REFRESH_TOKEN_GRANT_TYPE = "refreshToken";
private static final String REDIRECT_URL_WITH_CODE_TEMPLATE = "%s?code=%s";
Copy link
Member

Choose a reason for hiding this comment

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

P4

네이밍을 Template으로 가져가신 이유가 무엇인가요?!
통상적으로 %s, %d와 같이 정규식 문법을 사용할 땐 format이라는 표현을 많이 쓴다고 생각하여 다른 이유가 있었는지 궁금합니다!!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

저 때 template이란 단어가 생각나서 사용했습니다.
혹시 어색할까요??

Copy link
Member

Choose a reason for hiding this comment

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

@KWY0218 아무래도 정규식을 사용하고 실제 String.format() 함수에서 사용하는 상수값이다 보니 의미 전달력이 조금 떨어지지 않을까 생각했어요!!

급한 부분은 아니니 만약 동의하신다면 추후 커밋에 슬-쩍 포함해서 변경해주셔도 무관할 것 같습니다!! 👍

Comment on lines +3 to +15
import static org.sopt.makers.operation.code.failure.auth.AuthFailureCode.EXPIRED_PLATFORM_CODE;
import static org.sopt.makers.operation.code.failure.auth.AuthFailureCode.EXPIRED_REFRESH_TOKEN;
import static org.sopt.makers.operation.code.failure.auth.AuthFailureCode.INVALID_GRANT_TYPE;
import static org.sopt.makers.operation.code.failure.auth.AuthFailureCode.INVALID_SOCIAL_TYPE;
import static org.sopt.makers.operation.code.failure.auth.AuthFailureCode.NOT_FOUNT_REGISTERED_TEAM;
import static org.sopt.makers.operation.code.failure.auth.AuthFailureCode.NOT_NULL_CODE;
import static org.sopt.makers.operation.code.failure.auth.AuthFailureCode.NOT_NULL_GRANT_TYPE;
import static org.sopt.makers.operation.code.failure.auth.AuthFailureCode.NOT_NULL_REFRESH_TOKEN;
import static org.sopt.makers.operation.code.failure.auth.AuthFailureCode.USED_PLATFORM_CODE;
import static org.sopt.makers.operation.code.success.auth.AuthSuccessCode.SUCCESS_GENERATE_TOKEN;
import static org.sopt.makers.operation.code.success.auth.AuthSuccessCode.SUCCESS_RETURN_REDIRECT_URL_WITH_PLATFORM_CODE;
import static org.sopt.makers.operation.jwt.JwtTokenType.PLATFORM_CODE;
import static org.sopt.makers.operation.jwt.JwtTokenType.REFRESH_TOKEN;
Copy link
Member

Choose a reason for hiding this comment

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

P4

static import 문을 import 선언 섹션의 최하단이 아닌 최상단으로 옮기신 이유가 따로 있나요?!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

자동 정렬이 시켰습니다..!
다시 변경할까 싶었는데, 변수를 선언할 때도 항상 상수를 위에 다 정의한 것이 떠올라 커밋했습니다..!

@KWY0218 KWY0218 added this pull request to the merge queue Jun 26, 2024
Merged via the queue into develop with commit d0cbcad Jun 26, 2024
1 check passed
@KWY0218 KWY0218 deleted the feat/#270_T-10863 branch June 26, 2024 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[fix] GET /authorize API Response 수정
2 participants