public async Task <int> AddApiSecretAsync(ApiSecretsDto apiSecret) { HashApiSharedSecret(apiSecret); var secret = apiSecret.ToEntity(); return(await _apiResourceRepository.AddApiSecretAsync(apiSecret.ApiResourceId, secret)); }
public virtual async Task <int> DeleteApiSecretAsync(ApiSecretsDto apiSecret) { var secret = apiSecret.ToEntity(); var deleted = await ApiResourceRepository.DeleteApiSecretAsync(secret); await AuditEventLogger.LogEventAsync(new ApiSecretDeletedEvent(apiSecret.ApiResourceId, apiSecret.ApiSecretId)); return(deleted); }
public virtual async Task <int> AddApiSecretAsync(ApiSecretsDto apiSecret) { HashApiSharedSecret(apiSecret); var secret = apiSecret.ToEntity(); var added = await ApiResourceRepository.AddApiSecretAsync(apiSecret.ApiResourceId, secret); await AuditEventLogger.LogEventAsync(new ApiSecretAddedEvent(apiSecret.ApiResourceId, apiSecret.Type, apiSecret.Expiration)); return(added); }
public async Task <int> DeleteApiSecretAsync(ApiSecretsDto apiSecret) { var secret = apiSecret.ToEntity(); return(await _apiResourceRepository.DeleteApiSecretAsync(secret)); }