-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
73 changed files
with
1,920 additions
and
539 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 |
---|---|---|
|
@@ -65,3 +65,5 @@ logs/ | |
|
||
docker/docker-compose.yml | ||
/docker/.env | ||
|
||
firebase-genti.json |
88 changes: 88 additions & 0 deletions
88
genti-api/src/main/java/com/gt/genti/auth/api/AuthApi.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 |
---|---|---|
@@ -0,0 +1,88 @@ | ||
package com.gt.genti.auth.api; | ||
|
||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
import org.springframework.web.bind.annotation.RequestParam; | ||
|
||
import com.gt.genti.auth.dto.request.AppleLoginRequestDto; | ||
import com.gt.genti.auth.dto.request.SocialAppLoginRequest; | ||
import com.gt.genti.auth.dto.request.TokenRefreshRequestDto; | ||
import com.gt.genti.auth.dto.response.OauthJwtResponse; | ||
import com.gt.genti.auth.dto.response.SocialLoginResponse; | ||
import com.gt.genti.error.ResponseCode; | ||
import com.gt.genti.jwt.TokenResponse; | ||
import com.gt.genti.response.GentiResponse.ApiResult; | ||
import com.gt.genti.swagger.EnumResponse; | ||
import com.gt.genti.swagger.EnumResponses; | ||
import com.gt.genti.user.model.OauthPlatform; | ||
import com.gt.genti.user.model.UserRole; | ||
|
||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.Parameter; | ||
import io.swagger.v3.oas.annotations.headers.Header; | ||
import io.swagger.v3.oas.annotations.media.Content; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import io.swagger.v3.oas.annotations.responses.ApiResponse; | ||
import io.swagger.v3.oas.annotations.responses.ApiResponses; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
import jakarta.validation.Valid; | ||
import jakarta.validation.constraints.NotNull; | ||
|
||
; | ||
|
||
@Tag(name = "[AuthController] 인증 컨트롤러", description = "로그인을 처리한 후 토큰을 전달합니다.") | ||
public interface AuthApi { | ||
@Operation(summary = "oauth 로그인 페이지 호출", description = "구글, 카카오 oauth로그인페이지 로 Redirect 됩니다. url은 HttpHeader에 포함되어있습니다.") | ||
@ApiResponses(value = { | ||
@ApiResponse(responseCode = "303", description = "리디렉션을 위한 응답 헤더를 포함합니다.", headers = { | ||
@Header(name = "Location", description = "리디렉션 URL", schema = @Schema(type = "string")) | ||
}, content = @Content(schema = @Schema(hidden = true))) | ||
}) | ||
ResponseEntity<Object> login( | ||
@Parameter(description = "호출할 Oauth platform 종류", example = "KAKAO", schema = @Schema(allowableValues = { | ||
"KAKAO"})) | ||
@RequestParam(name = "oauthPlatform") OauthPlatform oauthPlatform); | ||
|
||
@EnumResponses(value = { | ||
@EnumResponse(ResponseCode.OK), | ||
@EnumResponse(ResponseCode.AppleOauthClaimInvalid), | ||
@EnumResponse(ResponseCode.AppleOauthIdTokenExpired), | ||
@EnumResponse(ResponseCode.AppleOauthIdTokenIncorrect), | ||
@EnumResponse(ResponseCode.AppleOauthIdTokenInvalid), | ||
@EnumResponse(ResponseCode.AppleOauthJwtValueInvalid), | ||
@EnumResponse(ResponseCode.AppleOauthPublicKeyInvalid), | ||
}) | ||
ResponseEntity<ApiResult<SocialLoginResponse>> loginApple( | ||
@RequestBody @Valid AppleLoginRequestDto request); | ||
|
||
ResponseEntity<ApiResult<SocialLoginResponse>> kakaoLogin( | ||
@RequestParam(name = "code") String code); | ||
|
||
@Deprecated | ||
ResponseEntity<ApiResult<SocialLoginResponse>> googleLogin( | ||
@RequestParam(name = "code") String code); | ||
|
||
@Operation(summary = "테스트용 jwt 토큰 발급", description = "") | ||
@EnumResponses(value = { | ||
@EnumResponse(ResponseCode.OK) | ||
}) | ||
ResponseEntity<ApiResult<TokenResponse>> getTestJwt( | ||
@NotNull @RequestParam(name = "role", value = "role") UserRole role); | ||
|
||
@Operation(summary = "oauth platform에서 로그인 후 받은 토큰을 전달하여 가입/로그인", description = "현재 애플, 카카오 지원합니다") | ||
@EnumResponses(value = { | ||
@EnumResponse(ResponseCode.OK), | ||
@EnumResponse(ResponseCode.AppleOauthClaimInvalid), | ||
@EnumResponse(ResponseCode.AppleOauthIdTokenExpired), | ||
@EnumResponse(ResponseCode.AppleOauthIdTokenIncorrect), | ||
@EnumResponse(ResponseCode.AppleOauthIdTokenInvalid), | ||
@EnumResponse(ResponseCode.AppleOauthJwtValueInvalid), | ||
@EnumResponse(ResponseCode.AppleOauthPublicKeyInvalid), | ||
}) | ||
ResponseEntity<ApiResult<OauthJwtResponse>> loginOrSignUpWithOAuthToken( | ||
@RequestBody @Valid SocialAppLoginRequest socialAppLoginRequest); | ||
|
||
ResponseEntity<ApiResult<TokenResponse>> reissue( | ||
@RequestBody @Valid TokenRefreshRequestDto tokenRefreshRequestDto | ||
); | ||
} |
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
50 changes: 50 additions & 0 deletions
50
genti-api/src/main/java/com/gt/genti/creator/api/CreatorApi.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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package com.gt.genti.creator.api; | ||
|
||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
|
||
import com.gt.genti.creator.dto.request.AccountUpdateRequestDto; | ||
import com.gt.genti.creator.dto.request.CreatorStatusUpdateRequestDto; | ||
import com.gt.genti.creator.dto.response.CreatorFindResponseDto; | ||
import com.gt.genti.creator.dto.response.CreatorStatusUpdateResponseDto; | ||
import com.gt.genti.error.ResponseCode; | ||
import com.gt.genti.response.GentiResponse.ApiResult; | ||
import com.gt.genti.swagger.AuthorizedCreator; | ||
import com.gt.genti.swagger.EnumResponse; | ||
import com.gt.genti.swagger.EnumResponses; | ||
import com.gt.genti.user.model.AuthUser; | ||
|
||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
import jakarta.validation.Valid; | ||
|
||
@Tag(name = "[CreatorController] 공급자 정보 컨트롤러", description = "공급자의 정보를 조회,수정합니다.") | ||
@AuthorizedCreator | ||
public interface CreatorApi { | ||
|
||
@Operation(summary = "공급자 내정보 보기", description = "공급자의 내정보 보기") | ||
@EnumResponses(value = { | ||
@EnumResponse(ResponseCode.OK), | ||
@EnumResponse(ResponseCode.CreatorNotFound) | ||
}) | ||
ResponseEntity<ApiResult<CreatorFindResponseDto>> getCreatorInfo( | ||
@AuthUser Long userId); | ||
|
||
@Operation(summary = "공급자 계좌정보 수정", description = "공급자의 내 계좌정보 수정") | ||
@EnumResponses(value = { | ||
@EnumResponse(ResponseCode.OK), | ||
@EnumResponse(ResponseCode.CreatorNotFound) | ||
}) | ||
ResponseEntity<ApiResult<Boolean>> updateAccountInfo( | ||
@AuthUser Long userId, | ||
@RequestBody @Valid AccountUpdateRequestDto accountUpdateRequestDto); | ||
|
||
@Operation(summary = "공급자 작업가능상태 수정", description = "공급자의 내 작업가능상태 수정") | ||
@EnumResponses(value = { | ||
@EnumResponse(ResponseCode.OK), | ||
@EnumResponse(ResponseCode.CreatorNotFound) | ||
}) | ||
ResponseEntity<ApiResult<CreatorStatusUpdateResponseDto>> updateCreatorStatus( | ||
@AuthUser Long userId, | ||
@RequestBody @Valid CreatorStatusUpdateRequestDto creatorStatusUpdateRequestDto); | ||
} |
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
37 changes: 37 additions & 0 deletions
37
genti-api/src/main/java/com/gt/genti/picture/api/PictureApi.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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package com.gt.genti.picture.api; | ||
|
||
import java.util.List; | ||
|
||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
|
||
import com.gt.genti.aws.dto.PreSignedUrlRequestDto; | ||
import com.gt.genti.aws.dto.PreSignedUrlResponseDto; | ||
import com.gt.genti.error.ResponseCode; | ||
import com.gt.genti.response.GentiResponse.ApiResult; | ||
import com.gt.genti.swagger.Authorized; | ||
import com.gt.genti.swagger.EnumResponse; | ||
import com.gt.genti.swagger.EnumResponses; | ||
|
||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
import jakarta.validation.Valid; | ||
|
||
@Authorized | ||
@Tag(name = "[PictureController] 공통 사진 컨트롤러", description = "사진 업로드 url을 요청합니다.") | ||
public interface PictureApi { | ||
|
||
@Operation(summary = "사진 업로드 url 1개 요청", description = "사진 1개의 업로드 url 요청") | ||
@EnumResponses(value = { | ||
@EnumResponse(ResponseCode.OK) | ||
}) | ||
ResponseEntity<ApiResult<PreSignedUrlResponseDto>> getUploadUrl( | ||
@RequestBody @Valid PreSignedUrlRequestDto preSignedUrlRequestDto); | ||
|
||
@Operation(summary = "사진 업로드 url 리스트 요청", description = "사진 여러개의 업로드 url 요청") | ||
@EnumResponses(value = { | ||
@EnumResponse(ResponseCode.OK) | ||
}) | ||
ResponseEntity<ApiResult<List<PreSignedUrlResponseDto>>> getUploadUrls( | ||
@RequestBody @Valid List<PreSignedUrlRequestDto> requestDtoList); | ||
} |
Oops, something went wrong.