-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #141 from kakao-tech-campus-2nd-step3/week10
Week10 merge
- Loading branch information
Showing
142 changed files
with
3,512 additions
and
1,008 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Run Tests on PR | ||
|
||
on: | ||
pull_request: | ||
types: [ opened, synchronize, reopened ] | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
checks: write | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up JDK 21 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '21' | ||
distribution: 'adopt' | ||
|
||
- name: Cache Gradle packages | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.gradle/caches | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x ./gradlew | ||
|
||
- name: Run tests | ||
run: ./gradlew test | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: 테스트 결과를 PR에 코멘트로 등록합니다 | ||
uses: EnricoMi/publish-unit-test-result-action@v1 | ||
if: always() | ||
with: | ||
files: '**/build/test-results/test/TEST-*.xml' | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
seconds_between_github_reads: 5 | ||
seconds_between_github_writes: 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 0 additions & 25 deletions
25
src/main/java/poomasi/domain/auth/signup/controller/SignupController.java
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
src/main/java/poomasi/domain/auth/signup/dto/request/SignupRequest.java
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
src/main/java/poomasi/domain/auth/signup/dto/response/SignUpResponse.java
This file was deleted.
Oops, something went wrong.
44 changes: 0 additions & 44 deletions
44
src/main/java/poomasi/domain/auth/signup/service/SignupService.java
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
src/main/java/poomasi/domain/auth/token/refreshtoken/service/RefreshTokenService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 14 additions & 8 deletions
22
src/main/java/poomasi/domain/auth/token/reissue/controller/ReissueTokenController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,29 @@ | ||
package poomasi.domain.auth.token.reissue.controller; | ||
|
||
|
||
import org.springframework.beans.factory.annotation.Autowired; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.http.HttpHeaders; | ||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
import org.springframework.web.bind.annotation.RequestHeader; | ||
import org.springframework.web.bind.annotation.RestController; | ||
import poomasi.domain.auth.token.reissue.dto.ReissueRequest; | ||
import poomasi.domain.auth.token.reissue.dto.ReissueResponse; | ||
import poomasi.domain.auth.token.reissue.service.ReissueTokenService; | ||
|
||
@RestController | ||
@RequiredArgsConstructor | ||
public class ReissueTokenController { | ||
|
||
@Autowired | ||
private ReissueTokenService reissueTokenService; | ||
private final ReissueTokenService reissueTokenService; | ||
|
||
@PostMapping("/api/reissue") | ||
public ResponseEntity<ReissueResponse> reissue(@RequestHeader(HttpHeaders.AUTHORIZATION) String authorizationHeader, | ||
@RequestBody ReissueRequest reissueRequest){ | ||
|
||
@GetMapping("/api/reissue") | ||
public ResponseEntity<ReissueResponse> reissue(@RequestBody ReissueRequest reissueRequest){ | ||
return ResponseEntity.ok(reissueTokenService.reissueToken(reissueRequest)); | ||
String accessToken = authorizationHeader.replace("Bearer ", ""); | ||
|
||
return ResponseEntity.ok(reissueTokenService.reissueToken(accessToken, reissueRequest)); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.