Skip to content

Commit

Permalink
Merge pull request #65 from SWM-WeLike2Coding/dev_deploy
Browse files Browse the repository at this point in the history
conf: 운영 서버 배포를 위한 머지 작업
  • Loading branch information
kjungw1025 authored Oct 23, 2024
2 parents b10bf84 + 1049c11 commit a86c063
Show file tree
Hide file tree
Showing 27 changed files with 1,066 additions and 275 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ dependencies {

// test
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation "org.testcontainers:junit-jupiter:1.16.3"
}

dependencyManagement {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
package com.wl2c.elswhereuserservice.domain.oauth.apple.controller;

import com.wl2c.elswhereuserservice.domain.oauth.apple.service.AppleOAuth2Service;
import com.wl2c.elswhereuserservice.domain.oauth.apple.service.AppleOAuth2V1Service;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletResponse;
import lombok.RequiredArgsConstructor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.util.UriComponentsBuilder;

import java.io.IOException;
import java.util.Map;
Expand All @@ -19,16 +14,16 @@
@RestController
@RequiredArgsConstructor
@RequestMapping("/v1/oauth2/apple")
public class AppleOAuth2Controller {
public class AppleOAuth2V1Controller {

private final AppleOAuth2Service appleOAuth2Service;
private final AppleOAuth2V1Service appleOAuth2V1Service;

/**
* Apple OAuth 인증 페이지로 리디렉션하는 엔드포인트
*/
@GetMapping("/login")
public void redirectToAppleOAuth(HttpServletResponse response) throws IOException {
String authorizationUri = appleOAuth2Service.getAuthorizationUri();
String authorizationUri = appleOAuth2V1Service.getAuthorizationUri();
response.sendRedirect(authorizationUri);
}

Expand All @@ -37,6 +32,6 @@ public void redirectToAppleOAuth(HttpServletResponse response) throws IOExceptio
*/
@PostMapping("/callback")
public ResponseEntity<?> handleAppleOAuthCallback(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
return appleOAuth2Service.handleAppleOAuthCallback(params, response);
return appleOAuth2V1Service.handleAppleOAuthCallback(params, response);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package com.wl2c.elswhereuserservice.domain.oauth.apple.controller;

import com.wl2c.elswhereuserservice.domain.oauth.apple.service.AppleOAuth2V2Service;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletResponse;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import java.io.IOException;
import java.util.Map;

@Tag(name = "애플 OAuth", description = "애플 OAuth 관련 api")
@RestController
@RequiredArgsConstructor
@RequestMapping("/v2/oauth2/apple")
public class AppleOAuth2V2Controller {

private final AppleOAuth2V2Service appleOAuth2V2Service;

/**
* Apple OAuth 인증 페이지로 리디렉션하는 엔드포인트
*/
@GetMapping("/login")
public void redirectToAppleOAuth(HttpServletResponse response) throws IOException {
String authorizationUri = appleOAuth2V2Service.getAuthorizationUri();
response.sendRedirect(authorizationUri);
}

/**
* Apple OAuth에서 인증 후 리디렉션될 콜백 엔드포인트
*/
@PostMapping("/callback")
public ResponseEntity<?> handleAppleOAuthCallback(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
return appleOAuth2V2Service.handleAppleOAuthCallback(params, response);
}
}

This file was deleted.

Loading

0 comments on commit a86c063

Please sign in to comment.