-
Notifications
You must be signed in to change notification settings - Fork 9
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
119 changed files
with
592 additions
and
412 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
plugins { | ||
id 'java' | ||
} | ||
|
||
group 'gg.auth' | ||
version '42gg' | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
implementation 'org.springframework.boot:spring-boot-starter-web' | ||
|
||
implementation 'io.jsonwebtoken:jjwt-api:0.11.2' | ||
implementation 'io.jsonwebtoken:jjwt-impl:0.11.2' | ||
implementation 'io.jsonwebtoken:jjwt-jackson:0.11.2' | ||
|
||
annotationProcessor "org.springframework.boot:spring-boot-configuration-processor" | ||
|
||
testImplementation testFixtures(project(':gg-utils')) | ||
} |
2 changes: 1 addition & 1 deletion
2
...g/pingpong/api/user/user/dto/UserDto.java → gg-auth/src/main/java/gg/auth/UserDto.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
2 changes: 1 addition & 1 deletion
2
.../global/utils/argumentresolver/Login.java → .../java/gg/auth/argumentresolver/Login.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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package gg.auth.config; | ||
|
||
import java.util.List; | ||
|
||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.web.method.support.HandlerMethodArgumentResolver; | ||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; | ||
|
||
import gg.auth.argumentresolver.LoginMemberArgumentResolver; | ||
import gg.auth.utils.AuthTokenProvider; | ||
import gg.repo.user.UserRepository; | ||
import lombok.RequiredArgsConstructor; | ||
|
||
@Configuration | ||
@RequiredArgsConstructor | ||
public class AuthWebConfig implements WebMvcConfigurer { | ||
private final UserRepository userRepository; | ||
private final AuthTokenProvider tokenProvider; | ||
|
||
@Override | ||
public void addArgumentResolvers(List<HandlerMethodArgumentResolver> resolvers) { | ||
resolvers.add(new LoginMemberArgumentResolver(userRepository, tokenProvider)); | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...rity/config/properties/AppProperties.java → ...ava/gg/auth/properties/AppProperties.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
4 changes: 2 additions & 2 deletions
4
...security/jwt/utils/AuthTokenProvider.java → ...java/gg/auth/utils/AuthTokenProvider.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
2 changes: 1 addition & 1 deletion
2
...pingpong/api/global/utils/HeaderUtil.java → ...c/main/java/gg/auth/utils/HeaderUtil.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,4 +1,4 @@ | ||
package gg.pingpong.api.global.utils; | ||
package gg.auth.utils; | ||
|
||
import javax.servlet.http.HttpServletRequest; | ||
|
||
|
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
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
24 changes: 24 additions & 0 deletions
24
gg-pingpong-api/src/main/java/gg/party/api/user/room/controller/response/CommentResDto.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,24 @@ | ||
package gg.party.api.user.room.controller.response; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@NoArgsConstructor | ||
@Getter | ||
public class CommentResDto { | ||
private Long commentId; | ||
private String nickname; | ||
private String content; | ||
private Boolean isHidden; | ||
private LocalDateTime createDate; | ||
|
||
public CommentResDto(Long id, String nickname, String content, boolean hidden, LocalDateTime createdAt) { | ||
this.commentId = id; | ||
this.nickname = nickname; | ||
this.content = content; | ||
this.isHidden = hidden; | ||
this.createDate = createdAt; | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
...ngpong-api/src/main/java/gg/party/api/user/room/controller/response/RoomDetailResDto.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,45 @@ | ||
package gg.party.api.user.room.controller.response; | ||
|
||
import java.time.LocalDateTime; | ||
import java.util.List; | ||
|
||
import gg.data.party.Room; | ||
import gg.data.party.type.RoomType; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@NoArgsConstructor(access = lombok.AccessLevel.PROTECTED) | ||
@Getter | ||
public class RoomDetailResDto { | ||
private Long roomId; | ||
private String title; | ||
private Long categoryId; | ||
private Integer currentPeople; | ||
private Integer minPeople; | ||
private Integer maxPeople; | ||
private RoomType status; | ||
private LocalDateTime dueDate; | ||
private LocalDateTime createDate; | ||
private String myNickname; | ||
private String hostNickname; | ||
private List<UserRoomResDto> roomUsers; | ||
private List<CommentResDto> comments; | ||
|
||
public RoomDetailResDto(Room room, String myNickname, String hostNickname, | ||
List<UserRoomResDto> roomUsers, | ||
List<CommentResDto> comments) { | ||
this.roomId = room.getId(); | ||
this.title = room.getTitle(); | ||
this.categoryId = room.getCategory().getId(); | ||
this.currentPeople = room.getCurrentPeople(); | ||
this.minPeople = room.getMinPeople(); | ||
this.maxPeople = room.getMaxPeople(); | ||
this.status = room.getStatus(); | ||
this.dueDate = room.getDueDate(); | ||
this.createDate = room.getCreatedAt(); | ||
this.myNickname = myNickname; | ||
this.hostNickname = hostNickname; | ||
this.roomUsers = roomUsers; | ||
this.comments = comments; | ||
} | ||
} |
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
16 changes: 16 additions & 0 deletions
16
gg-pingpong-api/src/main/java/gg/party/api/user/room/controller/response/UserRoomResDto.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,16 @@ | ||
package gg.party.api.user.room.controller.response; | ||
|
||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@NoArgsConstructor(access = lombok.AccessLevel.PROTECTED) | ||
@Getter | ||
public class UserRoomResDto { | ||
private Long roomUserId; | ||
private String nickname; | ||
|
||
public UserRoomResDto(Long id, String nickname) { | ||
this.roomUserId = id; | ||
this.nickname = nickname; | ||
} | ||
} |
Oops, something went wrong.