mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 22:11:36 -05:00
ListUserPoolClients was returning full UserPoolClient objects including ClientSecret, GenerateSecret, AllowedOAuthFlows, AllowedOAuthScopes, CreationDate and LastModifiedDate. Per the AWS API spec, this action returns UserPoolClientDescription containing only ClientId, ClientName and UserPoolId. Add clientToDescriptionNode() for the list response, matching the existing pattern where ListUserPools uses userPoolToDescriptionNode(). DescribeUserPoolClient continues to return the full object via clientToNode().
This commit is contained in:
3 files changed
+100
-1
No files matched your search
@@ -152,7 +152,7 @@ public class CognitoJsonHandler {
|
||||
List<UserPoolClient> clients = service.listUserPoolClients(request.path("UserPoolId").asText());
|
||||
ObjectNode response = objectMapper.createObjectNode();
|
||||
ArrayNode items = response.putArray("UserPoolClients");
|
||||
clients.forEach(c -> items.add(clientToNode(c)));
|
||||
clients.forEach(c -> items.add(clientToDescriptionNode(c)));
|
||||
return Response.ok(response).build();
|
||||
}
|
||||
|
||||
@@ -465,6 +465,14 @@ public class CognitoJsonHandler {
|
||||
return node;
|
||||
}
|
||||
|
||||
private ObjectNode clientToDescriptionNode(UserPoolClient c) {
|
||||
ObjectNode node = objectMapper.createObjectNode();
|
||||
node.put("ClientId", c.getClientId());
|
||||
node.put("ClientName", c.getClientName());
|
||||
node.put("UserPoolId", c.getUserPoolId());
|
||||
return node;
|
||||
}
|
||||
|
||||
private ObjectNode clientToNode(UserPoolClient c) {
|
||||
ObjectNode node = objectMapper.createObjectNode();
|
||||
node.put("ClientId", c.getClientId());
|
||||
|
||||
Reference in new issue
Block a user