use of com.epam.ta.reportportal.ws.model.integration.auth.SamlProvidersResource in project service-authorization by reportportal.
the class GetSamlIntegrationsStrategy method getIntegration.
@Override
public AbstractAuthResource getIntegration() {
IntegrationType samlIntegrationType = integrationTypeRepository.findByName(AuthIntegrationType.SAML.getName()).orElseThrow(() -> new ReportPortalException(ErrorType.AUTH_INTEGRATION_NOT_FOUND, AuthIntegrationType.SAML.getName()));
List<Integration> providers = integrationRepository.findAllGlobalByType(samlIntegrationType);
SamlProvidersResource resource = TO_PROVIDERS_RESOURCE.apply(providers);
resource.setType(samlIntegrationType.getName());
return resource;
}
Aggregations