-
Notifications
You must be signed in to change notification settings - Fork 1
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
Conversation
api 문서 수정으로 redirect url을 반환함에 따라 dto 수정
redirect url template을 상수로 만들어서 redirect uri와 platformCode를 redirctUrl 형태로 만든다
This pull request has been linked to 1 task:
|
There was a problem hiding this 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"; |
There was a problem hiding this comment.
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
이라는 표현을 많이 쓴다고 생각하여 다른 이유가 있었는지 궁금합니다!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저 때 template이란 단어가 생각나서 사용했습니다.
혹시 어색할까요??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KWY0218 아무래도 정규식을 사용하고 실제 String.format()
함수에서 사용하는 상수값이다 보니 의미 전달력이 조금 떨어지지 않을까 생각했어요!!
급한 부분은 아니니 만약 동의하신다면 추후 커밋에 슬-쩍 포함해서 변경해주셔도 무관할 것 같습니다!! 👍
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P4
static import 문을 import 선언 섹션의 최하단이 아닌 최상단으로 옮기신 이유가 따로 있나요?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
자동 정렬이 시켰습니다..!
다시 변경할까 싶었는데, 변수를 선언할 때도 항상 상수를 위에 다 정의한 것이 떠올라 커밋했습니다..!
Related Issue 🚀
Work Description ✏️
플랫폼 인가코드와 함께 리다이렉션 uri를 합쳐서 redirect url 형태로 넘겨주면서 웹의 부담을 줄이기로 결정했습니다.