Skip to content

Commit

Permalink
feat: 테스트 사용자를 두개로 늘린다.
Browse files Browse the repository at this point in the history
  • Loading branch information
hoyeonyy committed Oct 15, 2024
1 parent a3196ac commit 8aeb133
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,19 @@ public KakaoLoginResponse oauthLogin(OauthRequest oauthRequest) {
return new KakaoLoginResponse(loginProcessResult.memberId(), loginProcessResult.accessToken());
}

public LoginResponse basicLogin() {
public LoginResponse basicLoginAnna() {
Member member = Member.builder()
.name("김민겸")
.loginDetail(new LoginDetail(OauthType.GOOGLE, "google-social-login-id"))
.loginDetail(new LoginDetail(OauthType.GOOGLE, "google-social-login-id-anna"))
.build();
memberWriter.append(member);
return new LoginResponse(accessTokenProvider.provide(member));
}

public LoginResponse basicLoginHogee() {
Member member = Member.builder()
.name("조호연")
.loginDetail(new LoginDetail(OauthType.GOOGLE, "google-social-login-id-hogee"))
.build();
memberWriter.append(member);
return new LoginResponse(accessTokenProvider.provide(member));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,19 @@ public ResponseEntity<RestResponse<KakaoLoginResponse>> loginKakaoOauth(@Request
}

@Override
@PostMapping("/login")
@PostMapping("/login/anna")
@ExceptRequestLogging
public ResponseEntity<RestResponse<LoginResponse>> loginBasicOauth() {
LoginResponse response = kakaoAuthService.basicLogin();
public ResponseEntity<RestResponse<LoginResponse>> loginBasicOauthAnna() {
LoginResponse response = kakaoAuthService.basicLoginAnna();

return ResponseEntity.ok().body(new RestResponse<>(response));
}

@Override
@PostMapping("/login/hogee")
@ExceptRequestLogging
public ResponseEntity<RestResponse<LoginResponse>> loginBasicOauthHogee() {
LoginResponse response = kakaoAuthService.basicLoginHogee();

return ResponseEntity.ok().body(new RestResponse<>(response));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,17 @@ public interface AuthSwagger {
})
ResponseEntity<RestResponse<KakaoLoginResponse>> loginKakaoOauth(@RequestBody OauthRequest oauthRequest);

@Operation(summary = "테스트 용 로그인", description = "테스트 용 가짜 사용자로 로그인한다(accessToken 발급).")
@Operation(summary = "테스트 용 로그인(안나)", description = "테스트 용 가짜 사용자로 로그인한다(accessToken 발급).")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "로그인 성공!"),
})
ResponseEntity<RestResponse<LoginResponse>> loginBasicOauth();
ResponseEntity<RestResponse<LoginResponse>> loginBasicOauthAnna();

@Operation(summary = "테스트 용 로그인(호기)", description = "테스트 용 가짜 사용자로 로그인한다(accessToken 발급).")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "로그인 성공!"),
})
ResponseEntity<RestResponse<LoginResponse>> loginBasicOauthHogee();

@Operation(summary = "애플 로그인", description = "애플 Oauth Code를 사용하여 로그인한다(accessToken 발급).")
@ApiResponses({
Expand Down

0 comments on commit 8aeb133

Please sign in to comment.