-
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
1 parent
de513b0
commit aab1b58
Showing
16 changed files
with
166 additions
and
7 deletions.
There are no files selected for viewing
Binary file modified
BIN
+47 Bytes
(110%)
build/classes/java/main/com/sunjoo/auth/domain/UserRepository.class
Binary file not shown.
Binary file modified
BIN
+2.67 KB
(230%)
build/classes/java/main/com/sunjoo/auth/domain/controller/UserController.class
Binary file not shown.
Binary file modified
BIN
+4 Bytes
(100%)
build/classes/java/main/com/sunjoo/auth/domain/service/JwtServiceImpl.class
Binary file not shown.
Binary file modified
BIN
+364 Bytes
(220%)
build/classes/java/main/com/sunjoo/auth/domain/service/UserService.class
Binary file not shown.
Binary file modified
BIN
+5.22 KB
(260%)
build/classes/java/main/com/sunjoo/auth/domain/service/UserServiceImpl.class
Binary file not shown.
Binary file modified
BIN
+147 Bytes
(100%)
build/classes/java/main/com/sunjoo/auth/global/config/SecurityConfig.class
Binary file not shown.
Binary file modified
BIN
+970 Bytes
(410%)
build/classes/java/main/com/sunjoo/auth/global/config/WebConfig.class
Binary file not shown.
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
14 changes: 14 additions & 0 deletions
14
src/main/java/com/sunjoo/auth/domain/dto/KakaoLoginRequestDto.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,14 @@ | ||
package com.sunjoo.auth.domain.dto; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
|
||
@Getter | ||
@Setter | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class KakaoLoginRequestDto { | ||
private String name; | ||
} |
23 changes: 23 additions & 0 deletions
23
src/main/java/com/sunjoo/auth/domain/dto/KakaoLoginResponseDto.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,23 @@ | ||
package com.sunjoo.auth.domain.dto; | ||
|
||
import com.sunjoo.auth.domain.User; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
|
||
@Getter | ||
@Setter | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class KakaoLoginResponseDto { | ||
private long userNo; | ||
private String name; | ||
private String type; | ||
|
||
public KakaoLoginResponseDto(User user) { | ||
this.userNo = user.getUserNo(); | ||
this.name = user.getName(); | ||
this.type = user.getType(); | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
src/main/java/com/sunjoo/auth/domain/service/UserService.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,8 +1,14 @@ | ||
package com.sunjoo.auth.domain.service; | ||
|
||
import com.sunjoo.auth.domain.dto.KakaoLoginRequestDto; | ||
import com.sunjoo.auth.domain.dto.KakaoLoginResponseDto; | ||
import com.sunjoo.auth.domain.dto.UserRegisterRequestDto; | ||
import com.sunjoo.auth.domain.dto.UserRegisterResponseDto; | ||
|
||
import java.util.HashMap; | ||
|
||
public interface UserService { | ||
public UserRegisterResponseDto register(UserRegisterRequestDto registerRequestDto); | ||
public KakaoLoginRequestDto getKakaoUserInfo(String accessToken); | ||
public KakaoLoginResponseDto kakaoLogin(KakaoLoginRequestDto kakaoRequest); | ||
} |
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 |
---|---|---|
@@ -1,4 +1,16 @@ | ||
package com.sunjoo.auth.global.config; | ||
|
||
public class WebConfig { | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.web.servlet.config.annotation.CorsRegistry; | ||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; | ||
|
||
@Configuration | ||
public class WebConfig implements WebMvcConfigurer { | ||
|
||
@Override | ||
public void addCorsMappings(CorsRegistry registry) { | ||
registry.addMapping("/**") | ||
.allowedOrigins("*") | ||
.allowedMethods("GET", "POST", "PUT", "DELETE"); | ||
} | ||
} |