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-15] 애플로그인 API 변경, refresh token 발급 메커니즘 변경 #16

Merged
merged 22 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
0498910
🔥 불필요한 코드 및 final 삭제
youngreal Aug 21, 2024
e507360
refactor: OAuth 애플로그인 API
youngreal Aug 22, 2024
164da29
refactor: refresh token 발급 프로세스 개선
youngreal Aug 22, 2024
9d029c3
chore: 불필요한 yml파일 내용제거, gradle 정리
youngreal Aug 22, 2024
7841292
🔧 chore: add s3 and update actions script
youngreal Aug 23, 2024
65f64d4
✨feat: 전체 지역 조회에 방문횟수 표시
youngreal Aug 23, 2024
ddb2e27
Revert "✨feat: 전체 지역 조회에 방문횟수 표시"
youngreal Aug 23, 2024
bc41976
✨feat: 전체 지역 조회에 방문횟수 표시
youngreal Aug 23, 2024
3db2311
🔧 chore: ci 실패문제 해결
youngreal Aug 23, 2024
60dd985
Revert "🔧 chore: ci 실패문제 해결"
youngreal Aug 23, 2024
f6fb746
🔧 chore: ci 실패문제 해결
youngreal Aug 23, 2024
7eb6bdb
🔧 chore: Update MapService.java
youngreal Aug 23, 2024
b0b673a
🔧 chore: ci 실패문제 해결
youngreal Aug 23, 2024
3914393
Merge branch 'feat/#15' of https://github.com/dnd-side-project/dnd-11…
youngreal Aug 23, 2024
5659953
🔧 chore: ci 실패문제 해결
youngreal Aug 23, 2024
7f55071
Merge branch 'main' into feat/#15
youngreal Aug 23, 2024
97db8d1
🔧 chore: ci 실패문제 해결
youngreal Aug 23, 2024
55ffc70
Merge branch 'feat/#15' of https://github.com/dnd-side-project/dnd-11…
youngreal Aug 23, 2024
e8d284a
🔧 chore: ci 실패문제 해결
youngreal Aug 23, 2024
d794099
🔧 chore: ci 실패문제 해결
youngreal Aug 23, 2024
483ba11
🔧chore: 테스트 없이 빌드방식으로 변경
youngreal Aug 23, 2024
f6d27cc
🔧chore: update s3 path
youngreal Aug 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 28 additions & 6 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,21 @@ on:

env:
AWS_REGION: ap-northeast-2
AWS_S3_BUCKET: mapddang-s3
AWS_S3_BUCKET: ${{ secrets.AWS_BUCKET_NAME }}
AWS_CODE_DEPLOY_APPLICATION: mapddang-CD
AWS_CODE_DEPLOY_GROUP: mapddang-CD-group
MYSQL_URL: ${{ secrets.MYSQL_URL }}
MYSQL_USERNAME: ${{ secrets.MYSQL_USERNAME }}
MYSQL_PASSWORD: ${{ secrets.MYSQL_PASSWORD }}
APPLE_CLIENT_ID: ${{ secrets.APPLE_CLIENT_ID }}
APPLE_KEY_ID: ${{ secrets.APPLE_KEY_ID }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
APPLE_PRIVATE_KEY: ${{ secrets.APPLE_PRIVATE_KEY }}
JWT_SECRET_KEY: ${{ secrets.JWT_SECRET_KEY }}
ACCESS_TOKEN_EXPIRE: ${{ secrets.ACCESS_TOKEN_EXPIRE }}
REFRESH_TOKEN_EXPIRE: ${{ secrets.REFRESH_TOKEN_EXPIRE }}
AWS_S3_ACCESS_KEY: ${{ secrets.AWS_S3_ACCESS_KEY }}
AWS_S3_SECRET_KEY: ${{ secrets.AWS_S3_SECRET_KEY }}

jobs:
build-with-gradle:
Expand All @@ -30,19 +42,29 @@ jobs:
#gradlew 파일에 실행 권한 부여
- name: Grant execute permission to gradlew
run: chmod +x ./gradlew
#프로젝트 빌드(test 제외)
#프로젝트 빌드
- name: Build Project
run: ./gradlew clean build -x test
#AWS 자격증명 설정
- name: Setup AWS credential
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.EC2_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.EC2_SECRET_KEY }}
aws-access-key-id: ${{ secrets.AWS_S3_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_S3_SECRET_KEY }}
aws-region: ap-northeast-2
#ZIP 파일을 S3 버킷에 업로드
- name: Upload to AWS S3
run: aws deploy push --application-name ${{ env.AWS_CODE_DEPLOY_APPLICATION }} --ignore-hidden-files --s3-location s3://$AWS_S3_BUCKET/cicdtest/$GITHUB_SHA.zip --source .
run: |
aws deploy push \
--application-name ${{ env.AWS_CODE_DEPLOY_APPLICATION }} \
--ignore-hidden-files \
--s3-location s3://$AWS_S3_BUCKET/cicdtest/$GITHUB_SHA.zip \
--source .
#업로드된 ZIP 파일을 CodeDeploy로 배포
- name: AWS Code Deploy
run: aws deploy create-deployment --application-name ${{ env.AWS_CODE_DEPLOY_APPLICATION }} --deployment-config-name CodeDeployDefault.AllAtOnce --deployment-group-name ${{ env.AWS_CODE_DEPLOY_GROUP }} --s3-location bucket=$AWS_S3_BUCKET,key=cicdtest/$GITHUB_SHA.zip,bundleType=zip
run: |
aws deploy create-deployment \
--application-name ${{ env.AWS_CODE_DEPLOY_APPLICATION }} \
--deployment-config-name CodeDeployDefault.AllAtOnce \
--deployment-group-name ${{ env.AWS_CODE_DEPLOY_GROUP }} \
--s3-location bucket=$AWS_S3_BUCKET,bundleType=zip,key=cicdtest/$GITHUB_SHA.zip
12 changes: 9 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,22 @@ repositories {
}

dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'

//OpenFeign
implementation 'org.springframework.cloud:spring-cloud-starter-openfeign:4.1.3'

//JWT
implementation 'io.jsonwebtoken:jjwt-api:0.12.3'
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.12.3'
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.12.3'
implementation 'org.bouncycastle:bcprov-jdk18on:1.75'
implementation 'org.bouncycastle:bcpkix-jdk18on:1.75'

//AWS S3
implementation 'org.springframework.cloud:spring-cloud-starter-aws:2.2.6.RELEASE'

implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'com.mysql:mysql-connector-j'
annotationProcessor 'org.projectlombok:lombok'
Expand Down
11 changes: 0 additions & 11 deletions src/main/java/com/dnd/dndtravel/auth/apple/AppleClient.java

This file was deleted.

28 changes: 0 additions & 28 deletions src/main/java/com/dnd/dndtravel/auth/apple/AppleOauthService.java

This file was deleted.

This file was deleted.

54 changes: 0 additions & 54 deletions src/main/java/com/dnd/dndtravel/auth/apple/AppleTokenParser.java

This file was deleted.

42 changes: 0 additions & 42 deletions src/main/java/com/dnd/dndtravel/auth/apple/dto/ApplePublicKey.java

This file was deleted.

This file was deleted.

14 changes: 0 additions & 14 deletions src/main/java/com/dnd/dndtravel/auth/apple/dto/AppleUser.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.dnd.dndtravel.auth.config;

import org.springframework.context.annotation.Bean;

import com.dnd.dndtravel.auth.service.AppleFeignClientErrorDecoder;
import com.fasterxml.jackson.databind.ObjectMapper;

public class AppleFeignClientConfiguration {

@Bean
public AppleFeignClientErrorDecoder appleFeignClientErrorDecoder() {
return new AppleFeignClientErrorDecoder(new ObjectMapper());
}
}
20 changes: 20 additions & 0 deletions src/main/java/com/dnd/dndtravel/auth/config/AppleProperties.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.dnd.dndtravel.auth.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import lombok.Getter;
import lombok.Setter;

@Component
@ConfigurationProperties(prefix = "social-login.provider.apple")
@Getter
@Setter // 프로퍼티 주입에 필수
public class AppleProperties {
private String grantType;
private String clientId;
private String keyId;
private String teamId;
private String audience;
private String privateKey;
}
50 changes: 0 additions & 50 deletions src/main/java/com/dnd/dndtravel/auth/config/JwtFilter.java

This file was deleted.

Loading
Loading