feat(queries): user IDP links (#2751)

This commit is contained in:
Silvan
2021-12-07 08:33:52 +01:00
committed by GitHub
parent 2ad03285f1
commit 303d4945a7
13 changed files with 394 additions and 37 deletions

View File

@@ -606,14 +606,18 @@ func (s *Server) RemoveMachineKey(ctx context.Context, req *mgmt_pb.RemoveMachin
}
func (s *Server) ListHumanLinkedIDPs(ctx context.Context, req *mgmt_pb.ListHumanLinkedIDPsRequest) (*mgmt_pb.ListHumanLinkedIDPsResponse, error) {
res, err := s.user.SearchExternalIDPs(ctx, ListHumanLinkedIDPsRequestToModel(req))
queries, err := ListHumanLinkedIDPsRequestToQuery(ctx, req)
if err != nil {
return nil, err
}
res, err := s.query.UserIDPLinks(ctx, queries)
if err != nil {
return nil, err
}
return &mgmt_pb.ListHumanLinkedIDPsResponse{
Result: idp_grpc.IDPsToUserLinkPb(res.Result),
Result: idp_grpc.IDPUserLinksToPb(res.Links),
Details: obj_grpc.ToListDetails(
res.TotalResult,
res.Count,
res.Sequence,
res.Timestamp,
),