Esempio n. 1
0
        public void ShouldDecodeUri()
        {
            var userAuthentication = UserAuthentication.GetBasicAuthenticationUserInfoFromUri(new Uri("https://*****:*****@localhost:8545"));

            Assert.NotNull(userAuthentication);
            Assert.Equal("test", userAuthentication.UserName);
            Assert.Equal("123", userAuthentication.Password);

            var header = BasicAuthenticationHeaderHelper.GetBasicAuthenticationHeaderValueFromUri(new Uri("https://*****:*****@localhost:8545"));

            Assert.Equal("dGVzdDoxMjM=", header.Parameter);
            Assert.Equal("Basic", header.Scheme);
        }