-
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
Showing
13 changed files
with
70 additions
and
53 deletions.
There are no files selected for viewing
7 changes: 0 additions & 7 deletions
7
.../furizon/backend/feature/authentication/action/removeSession/JooqRemoveSessionAction.java
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
.../net/furizon/backend/feature/authentication/action/removeSession/RemoveSessionAction.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
8 changes: 0 additions & 8 deletions
8
application/src/main/java/net/furizon/backend/feature/authentication/dto/LogoutRequest.java
This file was deleted.
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
...tion/src/main/java/net/furizon/backend/feature/authentication/dto/LogoutUserResponse.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,10 @@ | ||
package net.furizon.backend.feature.authentication.dto; | ||
|
||
import lombok.Data; | ||
|
||
@Data | ||
public class LogoutUserResponse { | ||
public static final LogoutUserResponse SUCCESS = new LogoutUserResponse(true); | ||
|
||
private final boolean success; | ||
} |
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
21 changes: 0 additions & 21 deletions
21
...rc/main/java/net/furizon/backend/feature/authentication/usecase/DestoySessionUseCase.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
27 changes: 27 additions & 0 deletions
27
...n/src/main/java/net/furizon/backend/feature/authentication/usecase/LogoutUserUseCase.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,27 @@ | ||
package net.furizon.backend.feature.authentication.usecase; | ||
|
||
import lombok.RequiredArgsConstructor; | ||
import net.furizon.backend.infrastructure.security.session.action.deleteSession.DeleteSessionAction; | ||
import net.furizon.backend.infrastructure.usecase.UseCase; | ||
import org.jetbrains.annotations.NotNull; | ||
import org.springframework.stereotype.Component; | ||
import org.springframework.transaction.annotation.Transactional; | ||
|
||
import java.util.UUID; | ||
|
||
@Component | ||
@RequiredArgsConstructor | ||
public class LogoutUserUseCase implements UseCase<LogoutUserUseCase.Input, Boolean> { | ||
private final DeleteSessionAction deleteSessionAction; | ||
|
||
@Transactional | ||
@Override | ||
public @NotNull Boolean executor(@NotNull Input input) { | ||
deleteSessionAction.invoke(input.sessionId); | ||
|
||
return true; | ||
} | ||
|
||
|
||
public record Input(@NotNull UUID sessionId) {} | ||
} |
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
...on/createSession/CreateSessionAction.java → ...on/createSession/CreateSessionAction.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
...reateSession/JooqCreateSessionAction.java → ...reateSession/JooqCreateSessionAction.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