Exemple #1
0
        public async Task <bool> Execute(Scope scope)
        {
            if (scope == null)
            {
                throw new ArgumentNullException(nameof(scope));
            }

            if (await _scopeRepository.GetAsync(scope.Name) == null)
            {
                throw new IdentityServerManagerException(
                          ErrorCodes.InvalidParameterCode,
                          string.Format(ErrorDescriptions.TheScopeDoesntExist, scope.Name));
            }

            return(await _scopeRepository.UpdateAsync(scope));
        }