-
Notifications
You must be signed in to change notification settings - Fork 2
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
13 changed files
with
197 additions
and
100 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 |
---|---|---|
|
@@ -121,3 +121,4 @@ gradle-app.setting | |
logs/ | ||
application-*.yml | ||
src/main/resources/config | ||
!application-test.yml |
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
46 changes: 0 additions & 46 deletions
46
src/main/java/com/moabam/api/dto/AuthorizationCodeIssue.java
This file was deleted.
Oops, something went wrong.
26 changes: 26 additions & 0 deletions
26
src/main/java/com/moabam/api/dto/AuthorizationCodeRequest.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,26 @@ | ||
package com.moabam.api.dto; | ||
|
||
import static java.util.Objects.*; | ||
|
||
import java.util.List; | ||
|
||
import lombok.Builder; | ||
|
||
public record AuthorizationCodeRequest( | ||
String clientId, | ||
String redirectUri, | ||
String responseType, | ||
List<String> scope, | ||
String state | ||
) { | ||
|
||
@Builder | ||
public AuthorizationCodeRequest(String clientId, String redirectUri, String responseType, List<String> scope, | ||
String state) { | ||
this.clientId = requireNonNull(clientId); | ||
this.redirectUri = requireNonNull(redirectUri); | ||
this.responseType = responseType; | ||
this.scope = scope; | ||
this.state = state; | ||
} | ||
} |
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,19 @@ | ||
package com.moabam.api.mapper; | ||
|
||
import com.moabam.api.dto.AuthorizationCodeRequest; | ||
import com.moabam.global.config.OAuthConfig; | ||
|
||
import lombok.AccessLevel; | ||
import lombok.NoArgsConstructor; | ||
|
||
@NoArgsConstructor(access = AccessLevel.PRIVATE) | ||
public class OAuthMapper { | ||
|
||
public static AuthorizationCodeRequest toAuthorizationCodeRequest(OAuthConfig oAuthConfig) { | ||
return AuthorizationCodeRequest.builder() | ||
.clientId(oAuthConfig.client().clientId()) | ||
.redirectUri(oAuthConfig.provider().redirectUri()) | ||
.scope(oAuthConfig.client().scope()) | ||
.build(); | ||
} | ||
} |
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: 5 additions & 10 deletions
15
src/main/java/com/moabam/global/common/util/BaseImageUrl.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,15 +1,10 @@ | ||
package com.moabam.global.common.util; | ||
|
||
import lombok.Getter; | ||
import lombok.AccessLevel; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Getter | ||
public enum BaseImageUrl { | ||
@NoArgsConstructor(access = AccessLevel.PRIVATE) | ||
public class BaseImageUrl { | ||
|
||
PROFILE_URL("/profile/baseUrl"); | ||
|
||
private String url; | ||
|
||
BaseImageUrl(String url) { | ||
this.url = url; | ||
} | ||
public static final String PROFILE_URL = "/profile/baseUrl"; | ||
} |
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
Oops, something went wrong.