Exemple #1
0
        public void GettingDiscoveryClient_WithValidConfiguration_ProvidesValidDiscoveryEndpoint()
        {
            // Arrange
            var discoveryClient = identityServerHost.GetDiscoveryClient();

            // Act

            // Assert
            Assert.IsNotNull(discoveryClient);
            Assert.IsNotNull(discoveryClient.Authority);
        }
Exemple #2
0
        public static TokenClient GetTokenClient(this IdentityServerHost identityServerHost)
        {
            var discoveryClient = identityServerHost.GetDiscoveryClient();
            var doc             = discoveryClient.GetAsync().Result;

            return(new TokenClient(doc.TokenEndpoint, "testclient", "clientsecret"));
        }
Exemple #3
0
        public static IntrospectionClient GetIntroClient(this IdentityServerHost identityServerHost)
        {
            var discoveryClient = identityServerHost.GetDiscoveryClient();
            var doc             = discoveryClient.GetAsync().Result;

            return(new IntrospectionClient(doc.IntrospectionEndpoint, "identityserverhost", "testsecret"));
        }