Esempio n. 1
0
        public void Authenticate()
        {
            var result = client.Authenticate("https://localhost:39390", "fi", new RelayState <string>("register", null, "fi"));

            Assert.IsNotNull(result, "result");
            Assert.IsTrue(result.StartsWith("https://testi.apro.tunnistus.fi/idp/profile/SAML2/Redirect/SSO?SAMLRequest"), "Start of request URL");
        }
Esempio n. 2
0
        public void Authenticate_CertificateNotFound()
        {
            var cookieStorage = new InMemoryEncryptedCookieStorage();

            samlConfig.Saml2IdpCertificate = "not-found.cer";

            var client = new SuomiFiIdentificationClient(samlConfig, new AuthStateAccessor(cookieStorage), new RsaShaCrypto(samlConfig, new CertificateStore(samlConfig)));

            client.Authenticate("https://localhost:39390", "fi", new RelayState <string>("register", null, "fi"));
        }