Exemplo n.º 1
0
 public async Task DeleteScopeAsync(string name)
 {
     if (string.IsNullOrEmpty(name))
     {
         throw new ArgumentNullException("name");
     }
     var adminStore = new IdentityServer3AdminStore();
     await adminStore.DeleteScopeAsync(new Scope()
     {
         Name = name
     });
 }
Exemplo n.º 2
0
        public async Task <ActionResult> Delete(ScopeViewModel model)
        {
            try
            {
                Scope scope = new Scope {
                    Name = model.Name
                };

                var adminStore = new IdentityServer3AdminStore();
                await adminStore.DeleteScopeAsync(scope);

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View());
            }
        }