implemented password reset flow

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2024-08-09 23:56:40 +02:00
parent 95d47e3d63
commit 62c85410a9
10 changed files with 155 additions and 26 deletions

View File

@@ -81,10 +81,9 @@ public class FileStore implements AuthorizationService, ClientService, SessionSe
@Override
public Optional<User> forToken(String id) {
AccessToken token = accessTokens.get(id);
AccessToken token = accessTokens.remove(id);
if (token == null) return empty();
if (token.valid()) return Optional.of(token.user());
accessTokens.remove(token.id());
return empty();
}