added dashboard

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2024-09-17 12:40:05 +02:00
parent 2250a78e91
commit 30f2e115ea
10 changed files with 109 additions and 14 deletions

View File

@@ -334,6 +334,15 @@ public class FileStore implements AuthorizationService, ClientService, SessionSe
return this;
}
@Override
public List<String> authorizedClients(String userId) {
if (!json.has(AUTHORIZATIONS)) return List.of();
var authorizations = json.getJSONObject(AUTHORIZATIONS);
if (!authorizations.has(userId)) return List.of();
var clients = authorizations.getJSONObject(userId);
return new ArrayList<>(clients.keySet());
}
@Override
public Optional<Authorization> consumeAuthorization(String authCode) {