private void EnsureSeedClientData()
 {
     if (clientProvider != null)
     {
         Console.WriteLine("Clients being populated");
         foreach (var client in IdentityServerConfig.GetClients().ToList())
         {
             if (clientProvider.FindClientByIdAsync(client.ClientId).Result == null)
             {
                 clientProvider.AddAsync(client);
             }
         }
     }
     else
     {
         Console.WriteLine("Clients already populated");
     }
 }
Esempio n. 2
0
        public async Task <Client> FindClientByIdAsync(string clientId)
        {
            var client = await _clientProvider.FindClientByIdAsync(clientId);

            return(client);
        }