In a federated setup, a single metadata endpoint may have multiple IDP entities described.

It would be nice to have additional methods in RelyingPartyRegistrations to support this. For example:

Iterable<RelyingPartyRegistration.Builder> fromEntitiesDescriptorLocation(String entitiesDescriptorLocation);

Iterable<RelyingPartyRegistration.Builder> fromEntitiesDescriptor(InputSource entitiesDescriptor);

It should return a list of builders since each one represents a single IDPSSODescriptor. It will also give an opportunity to locally override settings like the registrationId.

@OrangeDog based on this comment, I'm wondering if fromEntitiesDescriptorLocation should take a public key for verifying the EntityDescriptors signature.