projects
/
demos
/
pact
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7df01dd
)
WIP
master
author
Kai Moritz
<kai@juplo.de>
Sun, 14 Mar 2021 13:58:13 +0000
(14:58 +0100)
committer
Kai Moritz
<kai@juplo.de>
Sun, 14 Mar 2021 13:58:13 +0000
(14:58 +0100)
pwreset/src/main/java/de/juplo/demos/pwreset/domain/internal/PasswordResetProgress.java
patch
|
blob
|
history
pwreset/src/main/java/de/juplo/demos/pwreset/domain/internal/PasswordResetService.java
patch
|
blob
|
history
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
(file)
--- 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 lombok.Value;
+import java.time.ZonedDateTime;
+import java.util.Optional;
+
@Value
public class PasswordResetProgress
{
public enum Status
{
@Value
public class PasswordResetProgress
{
public enum Status
{
- CONFIRMATION_DENIED,
+ NOT_AUTHORIZED,
+ CREATED,
CONFIMED,
ACCOMPLISHED
}
private final Status status;
private final String message;
CONFIMED,
ACCOMPLISHED
}
private final Status status;
private final String message;
+
+ private final Optional<ZonedDateTime> created;
+ private final Optional<ZonedDateTime> confirmed;
+ private final Optional<ZonedDateTime> 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
(file)
--- 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 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;
}
{
return null;
}
- public
Optional<PasswordResetRequest> findRequest(String email
)
+ public
PasswordResetProgress getProgress(UUID requestId, String secret
)
{
return null;
}
{
return null;
}
- public PasswordResetRequest getRequest(UUID requestId)
- {
- return null;
- }
-
- public PasswordResetProgress confirmRequest(PasswordResetRequest request, String code, String password)
- {
- return null;
- }
-
- public Optional<PasswordResetProgress> getProgress(UUID requestId)
+ public PasswordResetProgress confirmRequest(UUID requestID, String code, String password)
{
return null;
}
{
return null;
}