-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[♻️ refactor] 소셜 로그인 > 회원가입 로직 개선
- Loading branch information
Showing
7 changed files
with
58 additions
and
84 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
19 changes: 19 additions & 0 deletions
19
src/main/java/org/terning/terningserver/dto/auth/response/AccessTokenGetResponseDto.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,19 @@ | ||
package org.terning.terningserver.dto.auth.response; | ||
|
||
import lombok.Builder; | ||
import lombok.NonNull; | ||
import org.terning.terningserver.domain.Token; | ||
|
||
import static lombok.AccessLevel.*; | ||
|
||
@Builder(access = PRIVATE) | ||
public record AccessTokenGetResponseDto( | ||
@NonNull String accessToken | ||
) { | ||
|
||
public static AccessTokenGetResponseDto of(Token accessToken) { | ||
return AccessTokenGetResponseDto.builder() | ||
.accessToken(accessToken.getAccessToken()) | ||
.build(); | ||
} | ||
} |
21 changes: 0 additions & 21 deletions
21
src/main/java/org/terning/terningserver/dto/auth/response/TokenGetResponseDto.java
This file was deleted.
Oops, something went wrong.
9 changes: 5 additions & 4 deletions
9
src/main/java/org/terning/terningserver/service/AuthService.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,19 +1,20 @@ | ||
package org.terning.terningserver.service; | ||
|
||
import org.terning.terningserver.domain.User; | ||
import org.terning.terningserver.domain.enums.AuthType; | ||
import org.terning.terningserver.dto.auth.request.SignInRequestDto; | ||
import org.terning.terningserver.dto.auth.response.AccessTokenGetResponseDto; | ||
import org.terning.terningserver.dto.auth.response.SignInResponseDto; | ||
import org.terning.terningserver.dto.auth.response.TokenGetResponseDto; | ||
import org.terning.terningserver.dto.auth.response.SignUpResponseDto; | ||
|
||
public interface AuthService { | ||
|
||
SignInResponseDto signIn(String authAccessToken, SignInRequestDto request); | ||
|
||
User saveUser(SignInRequestDto request); | ||
SignUpResponseDto signUp(String authId, String name, Integer profileImage, AuthType authType); | ||
|
||
void signOut(long userId); | ||
|
||
void withdraw(long userId); | ||
|
||
TokenGetResponseDto reissueToken(String refreshToken); | ||
AccessTokenGetResponseDto reissueToken(String refreshToken); | ||
} |
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
38 changes: 0 additions & 38 deletions
38
src/main/java/org/terning/terningserver/service/SignUpService.java
This file was deleted.
Oops, something went wrong.