Skip to content

Commit

Permalink
Update saml integration
Browse files Browse the repository at this point in the history
  • Loading branch information
APiankouski committed Oct 24, 2024
1 parent b36c866 commit e553f92
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,16 @@
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.saml2.core.Saml2X509Credential;
import org.springframework.security.saml2.provider.service.metadata.OpenSamlMetadataResolver;
import org.springframework.security.saml2.provider.service.metadata.Saml2MetadataResolver;
import org.springframework.security.saml2.provider.service.registration.InMemoryRelyingPartyRegistrationRepository;
import org.springframework.security.saml2.provider.service.registration.RelyingPartyRegistration;
import org.springframework.security.saml2.provider.service.registration.RelyingPartyRegistrationRepository;
import org.springframework.security.saml2.provider.service.registration.RelyingPartyRegistrations;
import org.springframework.security.saml2.provider.service.registration.Saml2MessageBinding;
import org.springframework.security.saml2.provider.service.servlet.filter.Saml2WebSsoAuthenticationFilter;
import org.springframework.security.saml2.provider.service.web.DefaultRelyingPartyRegistrationResolver;
import org.springframework.security.saml2.provider.service.web.Saml2MetadataFilter;
import org.springframework.security.saml2.provider.service.web.authentication.OpenSaml4AuthenticationRequestResolver;
import org.springframework.security.saml2.provider.service.web.authentication.Saml2WebSsoAuthenticationFilter;

/**
* @author <a href="mailto:[email protected]">Andrei Piankouski</a>
Expand Down Expand Up @@ -134,7 +135,7 @@ protected void configure(HttpSecurity http) throws Exception {
}

@Bean
public RelyingPartyRegistrationRepository relyingParty() throws Exception {
public RelyingPartyRegistrationRepository relyingParty() {
IntegrationType samlIntegrationType = integrationTypeRepository.findByName(AuthIntegrationType.SAML.getName())
.orElseThrow(() -> new RuntimeException("SAML Integration Type not found"));

Expand All @@ -160,7 +161,7 @@ public RelyingPartyRegistrationRepository relyingParty() throws Exception {

}).collect(Collectors.toList());
String listAsString = registrations.stream()
.map(Object::toString)
.map(RelyingPartyRegistration::getRegistrationId)
.collect(Collectors.joining(", "));
LOGGER.error("RelyingPartyRegistration: " + listAsString);
return new InMemoryRelyingPartyRegistrationRepository(registrations);
Expand Down

0 comments on commit e553f92

Please sign in to comment.