Dynamically determine the Auth Request Type from SP?


I have just started the SAML 2.0 development. We are creating an IDP which can support multiple service provider. Some service provider follow Artifacts ReceiveArtifactByHTTPArtifact and other follows ReceiveAuthnRequestByHTTPRedirect methods. Can we dynamically know from the requested AuthRequest Type from the HTTP Request , before getting relay state and other information in ReceiveAuthnRequest() method?

If there is some other ways or suggestion to handle this scenario. Please let me know.


The authn request may include the protocol binding (eg HTTP-artifact or HTTP-post). However, this is the protocol binding that should be used to send the SAML response back to the service provider.
If you are supporting different bindings to receive authn requests, you could use different URLs in your identity provider application. For example, have an https://www.example.com/ssoservice/artifact endpoint for authn requests sent via HTTP-artifact, an https://www.example.com/ssoservice/redirect endpoint for authn requests sent via HTTP-redirect etc.