Search code examples
springsamlsaml-2.0spring-saml

How can we set different AssertionCosumerURL in SAML AuthnRequest in a SP initiated request for a multi tenant environment?


I have a multi-tenant environment in my application and i create the Local SP metadata for different clients based on alias. But when a SAML AuthnRequest is made for IDP the AssertionCosumerURL sent in the request is the one which is set by very first request and it doesn't change


Solution

  • I solved it by implementing the WebSSOProfile with my custom implementation and then changing the AssertionConsumerURL of AuthnRequest object by overriding the getAuthnRequest() method.