From: Kai Moritz Date: Sun, 14 Mar 2021 13:58:13 +0000 (+0100) Subject: WIP X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;ds=inline;p=demos%2Fpact WIP --- diff --git a/pwreset/src/main/java/de/juplo/demos/pwreset/domain/internal/PasswordResetProgress.java b/pwreset/src/main/java/de/juplo/demos/pwreset/domain/internal/PasswordResetProgress.java index 757f692..4b42c72 100644 --- a/pwreset/src/main/java/de/juplo/demos/pwreset/domain/internal/PasswordResetProgress.java +++ b/pwreset/src/main/java/de/juplo/demos/pwreset/domain/internal/PasswordResetProgress.java @@ -2,17 +2,25 @@ package de.juplo.demos.pwreset.domain.internal; import lombok.Value; +import java.time.ZonedDateTime; +import java.util.Optional; + @Value public class PasswordResetProgress { public enum Status { - CONFIRMATION_DENIED, + NOT_AUTHORIZED, + CREATED, CONFIMED, ACCOMPLISHED } private final Status status; private final String message; + + private final Optional created; + private final Optional confirmed; + private final Optional accomplished; } diff --git a/pwreset/src/main/java/de/juplo/demos/pwreset/domain/internal/PasswordResetService.java b/pwreset/src/main/java/de/juplo/demos/pwreset/domain/internal/PasswordResetService.java index 5d4b346..26a448c 100644 --- a/pwreset/src/main/java/de/juplo/demos/pwreset/domain/internal/PasswordResetService.java +++ b/pwreset/src/main/java/de/juplo/demos/pwreset/domain/internal/PasswordResetService.java @@ -6,27 +6,22 @@ import java.util.UUID; public class PasswordResetService { - public PasswordResetRequest createRequest(String email) + /** + * Fetches the ID fo an existing reset-request or creates a new reset-request and returns its ID. + * @param email + * @return + */ + public UUID createOrGetRequest(String email) { return null; } - public Optional findRequest(String email) + public PasswordResetProgress getProgress(UUID requestId, String secret) { return null; } - public PasswordResetRequest getRequest(UUID requestId) - { - return null; - } - - public PasswordResetProgress confirmRequest(PasswordResetRequest request, String code, String password) - { - return null; - } - - public Optional getProgress(UUID requestId) + public PasswordResetProgress confirmRequest(UUID requestID, String code, String password) { return null; }