use of com.epam.reportportal.auth.event.SamlProvidersReloadEvent in project service-authorization by reportportal.
the class SamlIntegrationStrategy method save.
@Override
protected Integration save(Integration integration) {
populateProviderDetails(integration);
final Integration result = super.save(integration);
eventPublisher.publishEvent(new SamlProvidersReloadEvent(result.getType()));
return result;
}
use of com.epam.reportportal.auth.event.SamlProvidersReloadEvent in project service-authorization by reportportal.
the class DeleteAuthIntegrationHandlerImpl method deleteAuthIntegrationById.
@Override
public OperationCompletionRS deleteAuthIntegrationById(Long integrationId) {
Integration integration = integrationRepository.findById(integrationId).orElseThrow(() -> new ReportPortalException(ErrorType.INTEGRATION_NOT_FOUND, integrationId));
BusinessRule.expect(integration.getType().getIntegrationGroup(), equalTo(IntegrationGroupEnum.AUTH)).verify(ErrorType.BAD_REQUEST_ERROR, "Integration should have an 'AUTH' integration group type.");
integrationRepository.deleteById(integrationId);
if (AuthIntegrationType.SAML.getName().equals(integration.getType().getName())) {
eventPublisher.publishEvent(new SamlProvidersReloadEvent(integration.getType()));
}
return new OperationCompletionRS("Auth integration with id= " + integrationId + " has been successfully removed.");
}
Aggregations