예제 #1
0
        public void Obtain_Provider_Information()
        {
            // given
            rpid   = "rp-discovery-openid_configuration";
            claims = "normal";
            string             hostname = GetBaseUrl("/");
            OpenIdRelyingParty rp       = new OpenIdRelyingParty();

            // when
            OIDCProviderMetadata response = rp.ObtainProviderInformation(hostname);

            // then
            response.validate();
        }
예제 #2
0
        public void Can_Discover_OpenID_Providers_With_JWKS_Json()
        {
            // given
            rpid   = "rp-discovery-jwks_uri_keys";
            claims = "normal";
            string             hostname = GetBaseUrl("/");
            OpenIdRelyingParty rp       = new OpenIdRelyingParty();

            // when
            OIDCProviderMetadata response = rp.ObtainProviderInformation(hostname);

            // then
            response.validate();
            Assert.NotNull(response.JwksUri);
            Assert.NotNull(response.Keys);
            Assert.Greater(response.Keys.Count, 0);
        }