Search in sources :

Example 1 with LocalServiceProviderConfiguration

use of org.springframework.security.saml.provider.service.config.LocalServiceProviderConfiguration in project service-authorization by reportportal.

the class SamlProvidersReloadEventHandler method onApplicationEvent.

@Override
public void onApplicationEvent(SamlProvidersReloadEvent event) {
    final IntegrationType integrationType = event.getIntegrationType();
    final List<Integration> integrations = integrationRepository.findAllGlobalByType(integrationType);
    LocalServiceProviderConfiguration serviceProvider = samlConfiguration.getServiceProvider();
    serviceProvider.getProviders().clear();
    serviceProvider.getProviders().addAll(SamlConverter.TO_EXTERNAL_PROVIDER_CONFIG.apply(integrations));
}
Also used : Integration(com.epam.ta.reportportal.entity.integration.Integration) LocalServiceProviderConfiguration(org.springframework.security.saml.provider.service.config.LocalServiceProviderConfiguration) IntegrationType(com.epam.ta.reportportal.entity.integration.IntegrationType)

Example 2 with LocalServiceProviderConfiguration

use of org.springframework.security.saml.provider.service.config.LocalServiceProviderConfiguration in project service-authorization by reportportal.

the class SamlServiceProviderConfiguration method serviceProviderConfiguration.

private LocalServiceProviderConfiguration serviceProviderConfiguration() {
    LocalServiceProviderConfiguration serviceProviderConfiguration = new LocalServiceProviderConfigurationDelegate(integrationTypeRepository);
    serviceProviderConfiguration.setSignRequests(signedRequests).setWantAssertionsSigned(signedRequests).setEntityId(entityId).setAlias(keyAlias).setSignMetadata(signedRequests).setSingleLogoutEnabled(true).setNameIds(Arrays.asList(NameID.EMAIL, NameID.PERSISTENT, NameID.UNSPECIFIED)).setKeys(rotatingKeys()).setProviders(providers()).setPrefix(prefix).setBasePath(basePath);
    return serviceProviderConfiguration;
}
Also used : LocalServiceProviderConfiguration(org.springframework.security.saml.provider.service.config.LocalServiceProviderConfiguration)

Aggregations

LocalServiceProviderConfiguration (org.springframework.security.saml.provider.service.config.LocalServiceProviderConfiguration)2 Integration (com.epam.ta.reportportal.entity.integration.Integration)1 IntegrationType (com.epam.ta.reportportal.entity.integration.IntegrationType)1