Quantcast
Channel: Spring Community Forums - SAML
Viewing all articles
Browse latest Browse all 56

Multiple IDPs configured in runtime

$
0
0
Hi,

I need to support multiple IDPs configured in runtime, metadata XML is saved to DB.
IDP should be selected automatically depending on passed HTTP param. So far I I'm considering something like this

Code:

public class SAMLContextProvider extends SAMLContextProviderImpl  {


    protected void populatePeerEntityId(SAMLMessageContext context) {
        HTTPInTransport inTransport = (HTTPInTransport) context.getInboundMessageTransport();

        String key= inTransport.getParameterValue("key");
        String peerId= database.getPeerId(key); // get peerId by passed HTTP param

        context.setPeerEntityId(peerId);

        context.setPeerUserSelected(true);
        context.setPeerEntityRole(IDPSSODescriptor.DEFAULT_ELEMENT_NAME);

    }

}

Now I need to figure out how to populate corresponding metadata into context.

It looks like I also need to customize or override MetadataManager and/or create custom MetadataProvider. Though the approach is not obvious.

I would appreciate any hints.

Viewing all articles
Browse latest Browse all 56

Trending Articles