public ActionResult Edit(string clientId)
        {
            OpenIdConnectClient client = null;
            if (!String.IsNullOrWhiteSpace(clientId))
            {
                client = this.repository.Get(clientId);
                if (client == null) return HttpNotFound();
            }
            else
            {
                client = new OpenIdConnectClient();
            }

            var vm = new OpenIdConnectClientViewModel(client); 
            return View("Edit", vm);
        }
 public bool ValidateClient(string clientId, string clientSecret, out OpenIdConnectClient client)
 {
     throw new NotImplementedException();
 }
 public void Update(OpenIdConnectClient model)
 {
     throw new NotImplementedException();
 }
        public static OpenIdConnectClient ToDomainModel(this OpenIdConnectClientEntity client)
        {
            var ret = new OpenIdConnectClient
            {
                ClientId = client.ClientId,
                AccessTokenLifetime = client.AccessTokenLifetime, 
                AllowRefreshToken = client.AllowRefreshToken,
                ClientSecretType = client.ClientSecretType, 
                Flow = client.Flow, 
                Name = client.Name,
                RefreshTokenLifetime = client.RefreshTokenLifetime, 
                RequireConsent = client.RequireConsent, 
            };

            if (client.RedirectUris != null)
            {
                ret.RedirectUris =
                    (from item in client.RedirectUris
                     select item.RedirectUri).ToArray();
            }
            else
            {
                ret.RedirectUris = new string[0];
            }
            
            return ret;
        }
 public OpenIdConnectClientViewModel(OpenIdConnectClient client)
 {
     Container.Current.SatisfyImportsOnce(this);
     this.Client = client;
     this.MapRedirectUris();
 }