Esempio n. 1
0
        public ActionResult <List <ClientViewModel> > GetClients()
        {
            List <ClientViewModel> Result = new List <ClientViewModel>();
            List <IdentityServer4.Models.Client> Clients = Repository.GetClients();

            if (Clients.Count > 0)
            {
                Result = Clients.ConvertAll(x => new ClientViewModel()
                {
                    Name   = x.ClientId,
                    Scopes = x.AllowedScopes.ToArray(),
                });
            }
            return(Result);
        }