Search in sources :

Example 1 with SamlProvidersResource

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;
}
Also used : Integration(com.epam.ta.reportportal.entity.integration.Integration) ReportPortalException(com.epam.ta.reportportal.exception.ReportPortalException) SamlProvidersResource(com.epam.ta.reportportal.ws.model.integration.auth.SamlProvidersResource) AuthIntegrationType(com.epam.reportportal.auth.integration.AuthIntegrationType) IntegrationType(com.epam.ta.reportportal.entity.integration.IntegrationType)

Aggregations

AuthIntegrationType (com.epam.reportportal.auth.integration.AuthIntegrationType)1 Integration (com.epam.ta.reportportal.entity.integration.Integration)1 IntegrationType (com.epam.ta.reportportal.entity.integration.IntegrationType)1 ReportPortalException (com.epam.ta.reportportal.exception.ReportPortalException)1 SamlProvidersResource (com.epam.ta.reportportal.ws.model.integration.auth.SamlProvidersResource)1