public void Can_build_saml_url()
        {
            var authenticationApiClient = new AuthenticationApiClient(new Uri(GetVariable("AUTH0_AUTHENTICATION_API_URL")));

            var samlUrl = authenticationApiClient.BuildSamlUrl("myclientid")
                .WithConnection("my-connection-name")
                .Build();

            samlUrl.Should().Be(@"https://auth0-dotnet-integration-tests.auth0.com/samlp/myclientid?connection=my-connection-name");
        }
        public void Can_build_saml_url()
        {
            var authenticationApiClient = new AuthenticationApiClient(GetVariable("AUTH0_AUTHENTICATION_API_URL"));

            var samlUrl = authenticationApiClient.BuildSamlUrl("myclientid")
                          .WithConnection("my-connection-name")
                          .Build();

            samlUrl.Should().Be(@"https://auth0-dotnet-integration-tests.auth0.com/samlp/myclientid?connection=my-connection-name");
        }
        public void Can_build_wsfed_with_relaystate_string()
        {
            var authenticationApiClient = new AuthenticationApiClient(GetVariable("AUTH0_AUTHENTICATION_API_URL"));

            var samlUrl = authenticationApiClient.BuildSamlUrl("myclientid")
                          .WithRelayState("xcrf=abc&ru=/foo")
                          .Build();

            samlUrl.Should().Be(@"https://auth0-dotnet-integration-tests.auth0.com/samlp/myclientid?RelayState=xcrf%3Dabc%26ru%3D%2Ffoo");
        }
        public void Can_build_wsfed_with_relaystate_dictionary()
        {
            var authenticationApiClient = new AuthenticationApiClient(new Uri(GetVariable("AUTH0_AUTHENTICATION_API_URL")));

            var samlUrl = authenticationApiClient.BuildSamlUrl("myclientid")
                .WithRelayState(new Dictionary<string, string>
                {
                    {"xcrf", "abc"},
                    {"ru", "/foo"}
                })
                .Build();

            samlUrl.Should().Be(@"https://auth0-dotnet-integration-tests.auth0.com/samlp/myclientid?relayState=xcrf%3Dabc%26ru%3D%2Ffoo");
        }
Exemple #5
0
        public void Can_build_wsfed_with_relaystate_dictionary()
        {
            var authenticationApiClient = new AuthenticationApiClient(new Uri(GetVariable("AUTH0_AUTHENTICATION_API_URL")));

            var samlUrl = authenticationApiClient.BuildSamlUrl("myclientid")
                          .WithRelayState(new Dictionary <string, string>
            {
                { "xcrf", "abc" },
                { "ru", "/foo" }
            })
                          .Build();

            samlUrl.Should().Be(@"https://auth0-dotnet-integration-tests.auth0.com/samlp/myclientid?relayState=xcrf%3Dabc%26ru%3D%2Ffoo");
        }