public void IdentityProvider_CreateAuthenticateRequest_PublicOrigin() { var origin = new Uri("https://my.public.origin:8443/"); var options = StubFactory.CreateOptionsPublicOrigin(origin); var idp = options.IdentityProviders.Default; var urls = StubFactory.CreateSaml2UrlsPublicOrigin(origin); var subject = idp.CreateAuthenticateRequest(urls); var expected = new Saml2AuthenticationRequest() { AssertionConsumerServiceUrl = urls.AssertionConsumerServiceUrl, DestinationUrl = idp.SingleSignOnServiceUrl, Issuer = options.SPOptions.EntityId, AttributeConsumingServiceIndex = 0 }; subject.Should().BeEquivalentTo(expected, opt => opt .Excluding(au => au.Id) .Excluding(au => au.SigningAlgorithm) .Excluding(au => au.RelayState)); }