Beispiel #1
0
        public void GetCorrectAuthUrl()
        {
            OidcClient client = new OidcClient(new OktaConfig("testoktaid", "https://dev-00000.oktapreview.com", "com.test:/redirect+&TEST!@url%20Encode#*^(0)", "com.test:/logout")
            {
                Scope = "test hello test_scope"
            });

            string url = client.GenerateAuthorizeUrlTest();

            Assert.StartsWith("https://dev-00000.oktapreview.com/oauth2/default/v1/authorize?", url);
            Assert.Contains("redirect_uri=com.test%3A%2Fredirect%2B%26TEST%21%40url%2520Encode%23%2A%5E%280%29", url);
            Assert.Contains("client_id=testoktaid", url);
            Assert.Contains("scope=test%20hello%20test_scope", url);
        }