-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/#1 #2
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
Open
jhlarry1109
wants to merge
12
commits into
main
Choose a base branch
from
feat/#1
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Feat/#1 #2
Changes from 5 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
06b6d70
feat: User 엔티티 추가
jhlarry1109 f01f8d9
feat: User 엔티티에 create 메서드 추가/dto 추가
jhlarry1109 9132b8d
feat: repository 추가
jhlarry1109 c13b825
feat: service 추가
jhlarry1109 759c05f
feat: jwt 인증 구조 / controller 추가
jhlarry1109 78786af
fix: JwtFilter에서 @Component 제거
jhlarry1109 0e153c4
fix: JwtFilter 인증 실패 추가
jhlarry1109 bf07834
delete: 테스트 로직 삭제
jhlarry1109 ee404d0
fix: UserPrincipal에 role 추가 / HttpUtil을 ResponseUtil로 수정
jhlarry1109 64ea9de
fix: 포트 번호 8081
jhlarry1109 3d13dab
feat: 비밀번호 인코딩 추가 / Auth 와의 내부 로그인 API 추가
jhlarry1109 78b06ae
feat: Auth와 Role 통일
Hyun731 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
src/main/java/com/example/user/controller/UserController.java
This file contains hidden or 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,4 @@ | ||
| package com.example.user.controller; | ||
|
|
||
| public class UserController { | ||
| } |
15 changes: 15 additions & 0 deletions
15
src/main/java/com/example/user/dto/request/SignUpRequest.java
This file contains hidden or 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,15 @@ | ||
| package com.example.user.dto; | ||
|
|
||
| import jakarta.validation.constraints.NotNull; | ||
|
|
||
| public record SignUpRequest( | ||
| @NotNull | ||
| String email, | ||
|
|
||
| @NotNull | ||
| String password, | ||
|
|
||
| @NotNull | ||
| String name | ||
| ) { | ||
| } |
11 changes: 11 additions & 0 deletions
11
src/main/java/com/example/user/dto/request/UserUpdateRequest.java
This file contains hidden or 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,11 @@ | ||
| package com.example.user.dto; | ||
|
|
||
| import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
|
||
| public record UserUpdateRequest( | ||
| String name, | ||
|
|
||
| @JsonProperty("image_url") | ||
| String imageUrl | ||
| ) { | ||
| } |
4 changes: 4 additions & 0 deletions
4
src/main/java/com/example/user/dto/response/SignUpResponse.java
This file contains hidden or 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,4 @@ | ||
| package com.example.user.dto.response; | ||
|
|
||
| public record UserCreateResponse() { | ||
| } |
4 changes: 4 additions & 0 deletions
4
src/main/java/com/example/user/dto/response/UserSearchResponse.java
This file contains hidden or 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,4 @@ | ||
| package com.example.user.dto.response; | ||
|
|
||
| public record UserSearchResponse() { | ||
| } |
This file contains hidden or 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,4 @@ | ||
| package com.example.user.entity; | ||
|
|
||
| public enum Role { | ||
| } |
This file contains hidden or 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,4 @@ | ||
| package com.example.user.entity; | ||
|
|
||
| public class User { | ||
| } |
This file contains hidden or 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,4 @@ | ||
| package com.example.user.global.dto; | ||
|
|
||
| public record ApiResponse() { | ||
| } |
30 changes: 30 additions & 0 deletions
30
src/main/java/com/example/user/global/security/JwtFilter.java
This file contains hidden or 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,30 @@ | ||
| package com.example.user.global.security; | ||
|
|
||
| import jakarta.servlet.FilterChain; | ||
| import jakarta.servlet.ServletException; | ||
| import jakarta.servlet.http.HttpServletRequest; | ||
| import jakarta.servlet.http.HttpServletResponse; | ||
| import lombok.RequiredArgsConstructor; | ||
| import org.springframework.stereotype.Component; | ||
| import org.springframework.web.filter.OncePerRequestFilter; | ||
|
|
||
| import java.io.IOException; | ||
|
|
||
| @Component | ||
| @RequiredArgsConstructor | ||
| public class UserAuthenticationFilter extends OncePerRequestFilter { | ||
|
|
||
| @Override | ||
| protected void doFilterInternal(HttpServletRequest request, | ||
| HttpServletResponse response, | ||
| FilterChain filterChain) | ||
| throws ServletException, IOException { | ||
| String token = request.getHeader("Authorization"); | ||
|
|
||
| if (token != null && token.startsWith("Bearer ")) { | ||
| token = token.substring(7); | ||
|
|
||
| String userId = jwtProvider.get | ||
| } | ||
| } | ||
| } |
4 changes: 4 additions & 0 deletions
4
src/main/java/com/example/user/global/security/JwtProvider.java
This file contains hidden or 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,4 @@ | ||
| package com.example.user.global.security; | ||
|
|
||
| public class JwtProvider { | ||
| } |
4 changes: 4 additions & 0 deletions
4
src/main/java/com/example/user/global/security/UserPrincipal.java
This file contains hidden or 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,4 @@ | ||
| package com.example.user.global.security; | ||
|
|
||
| public class UserPrincipal { | ||
| } |
This file contains hidden or 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,4 @@ | ||
| package com.example.user.global.util; | ||
|
|
||
| public class HttpUtil { | ||
| } |
4 changes: 4 additions & 0 deletions
4
src/main/java/com/example/user/repository/UserRepository.java
This file contains hidden or 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,4 @@ | ||
| package com.example.user.repository; | ||
|
|
||
| public interface UserRepository { | ||
| } |
This file contains hidden or 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,4 @@ | ||
| package com.example.user.service; | ||
|
|
||
| public class UserService { | ||
| } |
File renamed without changes.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.