Esempio n. 1
0
        public async Task <ActionResult> RegisterScope(ScopeViewModel scopeViewModel)
        {
            ActionResult Result = Ok();

            IdentityServer4.Models.ApiScope Scope = new IdentityServer4.Models.ApiScope
            {
                Name        = scopeViewModel.Name,
                DisplayName = scopeViewModel.DisplayName
            };
            bool IsSuccess = await Repository.AddApiScope(Scope);

            if (!IsSuccess)
            {
                Result = Problem("Error to add scope", null, 500, "", null);
            }
            return(Result);
        }