-
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.
feat: oAuth에 id, thumbnail_image,nick_name email받아오게 변경
- Loading branch information
Showing
24 changed files
with
128 additions
and
59 deletions.
There are no files selected for viewing
6 changes: 3 additions & 3 deletions
6
core-api/src/main/java/com/imlinker/coreapi/configuration/SecurityConfiguration.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
15 changes: 15 additions & 0 deletions
15
core-api/src/main/java/com/imlinker/coreapi/core/auth/controller/AuthController.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,15 @@ | ||
package com.imlinker.coreapi.core.auth.controller; | ||
|
||
import com.imlinker.coreapi.support.response.ApiResponse; | ||
import com.imlinker.enums.OperationResult; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
@RestController | ||
public class AuthController { | ||
|
||
@PostMapping | ||
public ApiResponse<OperationResult> signUp() { | ||
return ApiResponse.success(OperationResult.SUCCESS); | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
core-api/src/main/java/com/imlinker/coreapi/core/auth/controller/request/SignUpRequest.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,12 @@ | ||
package com.imlinker.coreapi.core.auth.controller.request; | ||
|
||
import com.imlinker.domain.tag.Tag; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import java.util.List; | ||
|
||
public record SignUpRequest( | ||
@Schema(description = "oAuth 식별자") String oAuthId, | ||
@Schema(description = "이름") String name, | ||
@Schema(description = "프로필 이미지 URL") String profileImgUrl, | ||
@Schema(description = "핸드폰 번호") String phoneNumber, | ||
@Schema(description = "관심사") List<Tag> tags) {} |
19 changes: 0 additions & 19 deletions
19
.../java/com/imlinker/coreapi/core/auth/oauth2/vendor/KakaoOAuthVendorAttributeResolver.java
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
.../main/java/com/imlinker/coreapi/core/auth/oauth2/vendor/OAuthVendorAttributeResolver.java
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...ore/auth/jwt/JwtAuthenticationFilter.java → ...security/jwt/JwtAuthenticationFilter.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
...api/core/auth/jwt/JwtTokenProperties.java → ...auth/security/jwt/JwtTokenProperties.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
...reapi/core/auth/jwt/JwtTokenProvider.java → ...e/auth/security/jwt/JwtTokenProvider.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
...oreapi/core/auth/jwt/TokenProperties.java → ...re/auth/security/jwt/TokenProperties.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
...nker/coreapi/core/auth/jwt/TokenType.java → ...api/core/auth/security/jwt/TokenType.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
...uth/oauth2/CustomAccessDeniedHandler.java → ...ity/oauth2/CustomAccessDeniedHandler.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
...auth2/CustomAuthenticationEntryPoint.java → ...auth2/CustomAuthenticationEntryPoint.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
2 changes: 1 addition & 1 deletion
2
...2/CustomAuthorizationRequestResolver.java → ...2/CustomAuthorizationRequestResolver.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
...h/oauth2/CustomClientOriginHostCache.java → ...y/oauth2/CustomClientOriginHostCache.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
...2/CustomClientRegistrationRepository.java → ...2/CustomClientRegistrationRepository.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
...pi/core/auth/oauth2/CustomOAuth2User.java → ...uth/security/oauth2/CustomOAuth2User.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
.../auth/oauth2/CustomOAuth2UserService.java → ...urity/oauth2/CustomOAuth2UserService.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
36 changes: 36 additions & 0 deletions
36
.../imlinker/coreapi/core/auth/security/oauth2/vendor/KakaoOAuthVendorAttributeResolver.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,36 @@ | ||
package com.imlinker.coreapi.core.auth.security.oauth2.vendor; | ||
|
||
import com.imlinker.domain.common.Email; | ||
import java.util.Map; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
public class KakaoOAuthVendorAttributeResolver implements OAuthVendorAttributeResolver { | ||
@Override | ||
public OAuthVendor getVendor() { | ||
return OAuthVendor.KAKAO; | ||
} | ||
|
||
@Override | ||
public String getOAuthId(Map<String, Object> attributes) { | ||
return attributes.get("id").toString(); | ||
} | ||
|
||
@Override | ||
public Email getEmail(Map<String, Object> attributes) { | ||
Map<String, String> emailAttributes = (Map<String, String>) attributes.get("kakao_account"); | ||
return Email.of(emailAttributes.get("email")); | ||
} | ||
|
||
@Override | ||
public String getProfileImgUrl(Map<String, Object> attributes) { | ||
Map<String, String> emailAttributes = (Map<String, String>) attributes.get("properties"); | ||
return emailAttributes.get("thumbnail_image"); | ||
} | ||
|
||
@Override | ||
public String getNickname(Map<String, Object> attributes) { | ||
Map<String, String> emailAttributes = (Map<String, String>) attributes.get("properties"); | ||
return emailAttributes.get("nickname"); | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
.../core/auth/oauth2/vendor/OAuthVendor.java → ...h/security/oauth2/vendor/OAuthVendor.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
17 changes: 17 additions & 0 deletions
17
...a/com/imlinker/coreapi/core/auth/security/oauth2/vendor/OAuthVendorAttributeResolver.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,17 @@ | ||
package com.imlinker.coreapi.core.auth.security.oauth2.vendor; | ||
|
||
import com.imlinker.domain.common.Email; | ||
import java.util.Map; | ||
|
||
public interface OAuthVendorAttributeResolver { | ||
|
||
OAuthVendor getVendor(); | ||
|
||
String getOAuthId(Map<String, Object> attributes); | ||
|
||
Email getEmail(Map<String, Object> attributes); | ||
|
||
String getProfileImgUrl(Map<String, Object> attributes); | ||
|
||
String getNickname(Map<String, Object> attributes); | ||
} |
5 changes: 2 additions & 3 deletions
5
core-api/src/main/java/com/imlinker/coreapi/core/my/request/UpdateMyInfoRequest.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,11 +1,10 @@ | ||
package com.imlinker.coreapi.core.my.request; | ||
|
||
import com.imlinker.domain.tag.Tag; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import java.util.List; | ||
|
||
public record UpdateMyInfoRequest( | ||
@Schema(description = "이름") String name, | ||
@Schema(description = "프로필 이미지 URL") String profileImgUrl, | ||
@Schema(description = "직업", nullable = true) String job, | ||
@Schema(description = "소속", nullable = true) String association, | ||
@Schema(description = "관심사") List<String> tags) {} | ||
@Schema(description = "관심사") List<Tag> tags) {} |
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