-
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.
Browse files
Browse the repository at this point in the history
✨ feat: 애플 로그인 구현
- Loading branch information
Showing
22 changed files
with
199 additions
and
156 deletions.
There are no files selected for viewing
13 changes: 0 additions & 13 deletions
13
motivoo-api/src/main/java/sopt/org/motivoo/api/controller/auth/apple/AppleApiClient.java
This file was deleted.
Oops, something went wrong.
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
16 changes: 16 additions & 0 deletions
16
...n/java/sopt/org/motivoo/api/controller/auth/dto/response/OAuthPlatformMemberResponse.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,16 @@ | ||
package sopt.org.motivoo.api.controller.auth.dto.response; | ||
|
||
|
||
import lombok.AccessLevel; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@AllArgsConstructor | ||
public class OAuthPlatformMemberResponse { | ||
|
||
private String platformId; | ||
private String email; | ||
} |
18 changes: 0 additions & 18 deletions
18
...src/main/java/sopt/org/motivoo/api/controller/auth/dto/response/apple/ApplePublicKey.java
This file was deleted.
Oops, something went wrong.
30 changes: 0 additions & 30 deletions
30
...rc/main/java/sopt/org/motivoo/api/controller/auth/dto/response/apple/ApplePublicKeys.java
This file was deleted.
Oops, something went wrong.
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
41 changes: 41 additions & 0 deletions
41
...voo-domain/src/main/java/sopt/org/motivoo/domain/auth/repository/TokenRedisRetriever.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,41 @@ | ||
package sopt.org.motivoo.domain.auth.repository; | ||
|
||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.data.redis.core.RedisTemplate; | ||
import org.springframework.data.redis.core.ValueOperations; | ||
import org.springframework.stereotype.Component; | ||
import sopt.org.motivoo.domain.user.exception.UserException; | ||
|
||
import java.util.Date; | ||
|
||
import static sopt.org.motivoo.domain.user.exception.UserExceptionType.TOKEN_NOT_FOUND; | ||
|
||
|
||
@Component | ||
@RequiredArgsConstructor | ||
public class TokenRedisRetriever { | ||
private final TokenRedisRepository tokenRedisRepository; | ||
public void saveRefreshToken(String refreshToken, String account) { | ||
tokenRedisRepository.saveRefreshToken(refreshToken, account); | ||
} | ||
|
||
|
||
public void saveBlockedToken(String accessToken) { | ||
tokenRedisRepository.saveBlockedToken(accessToken); | ||
} | ||
|
||
private Date getExpirationFromToken(String accessToken) { | ||
return tokenRedisRepository.getExpirationFromToken(accessToken); | ||
} | ||
|
||
|
||
public String getRefreshToken(String refreshToken) { | ||
return tokenRedisRepository.findByRefreshToken(refreshToken).orElseThrow( | ||
() -> new UserException(TOKEN_NOT_FOUND)); | ||
} | ||
|
||
|
||
public void deleteRefreshToken(String refreshToken) { | ||
tokenRedisRepository.deleteRefreshToken(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
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
Oops, something went wrong.