public virtual async Task <ApiScopeDto> AddScopeAsync(ApiScopeCreateDto apiScopeCreate) { var apiResource = await ApiResourceRepository.GetAsync(apiScopeCreate.ApiResourceId); var apiResourceScope = apiResource.FindScope(apiScopeCreate.Name); if (apiResourceScope == null) { apiResource.AddScope(apiScopeCreate.Name, apiScopeCreate.DisplayName, apiScopeCreate.Description, apiScopeCreate.Required, apiScopeCreate.Emphasize, apiScopeCreate.ShowInDiscoveryDocument); apiResourceScope = apiResource.FindScope(apiScopeCreate.Name); } return(ObjectMapper.Map <ApiScope, ApiScopeDto>(apiResourceScope)); }
public virtual async Task <ApiScopeDto> AddScopeAsync(ApiScopeCreateDto apiScopeCreate) { return(await ApiResourceAppService.AddScopeAsync(apiScopeCreate)); }