public async Task <IActionResult> UpdateApiScope(MScopeDto dto) { var resourceInDB = await ApiScopesService.GetApiScopeAsync(dto.Id); var updated = _mapper.Map(dto, resourceInDB); await ApiScopesService.UpdateApiScopeAsync(updated); return(Ok()); }
public async Task CreateApiScopeAsync(MScopeDto dto) { var resource = _mapper.Map <Scope>(dto); resource.Type = ScopeType.ApiScope; await DbContext.Scopes.AddAsync(resource); await DbContext.SaveChangesAsync(); EventDispatcher.DispatchCreatedEvent("IDPApiScopes", _mapper.Map <MScopeDto>(resource)); }
public async Task <IActionResult> CreateApiScope(MScopeDto dto) { await ApiScopesService.CreateApiScopeAsync(dto); return(Ok()); }
public async Task <IActionResult> CreateIdentityResource(MScopeDto dto) { await IdentityResourcesService.CreateIdentityResourceAsync(dto); return(Ok()); }