public void SuccessfulPermissionCreation()
        {
            GrantedTokenResponse grantedToken = null !;
            UmaClient            client       = null !;
            JsonWebKeySet        jwks         = null !;
            string resourceId = null !;
            string ticketId   = null !;

            "and the server's signing key".x(
                async() =>
            {
                var json = await _fixture.Client().GetStringAsync(BaseUrl + "/jwks").ConfigureAwait(false);
                jwks     = new JsonWebKeySet(json);

                Assert.NotEmpty(jwks.Keys);
            });

            "and a valid UMA token".x(
                async() =>
            {
                var tokenClient = new TokenClient(
                    TokenCredentials.FromClientCredentials("clientCredentials", "clientCredentials"),
                    _fixture.Client,
                    new Uri(WellKnownUmaConfiguration));
                var token = await tokenClient.GetToken(TokenRequest.FromScopes("uma_protection"))
                            .ConfigureAwait(false) as Option <GrantedTokenResponse> .Result;
                grantedToken = token !.Item;
            });

            "and a properly configured uma client".x(
                () => client = new UmaClient(_fixture.Client, new Uri(WellKnownUmaConfiguration)));

            "when registering resource".x(
                async() =>
            {
                var resource = await client.AddResource(
                    new ResourceSet {
                    Name = "picture", Scopes = new[] { "read" }
                },
                    grantedToken.AccessToken)
                               .ConfigureAwait(false) as Option <AddResourceSetResponse> .Result;
                resourceId = resource.Item.Id;
            });

            "and adding permission".x(
                async() =>
            {
                var response = await client.RequestPermission(
                    grantedToken.AccessToken,
                    requests: new PermissionRequest {
                    ResourceSetId = resourceId, Scopes = new[] { "read" }
                })
                               .ConfigureAwait(false) as Option <TicketResponse> .Result;

                ticketId = response !.Item.TicketId;
            });

            "then returns ticket id".x(() => { Assert.NotNull(ticketId); });
        }
        public void SuccessfulMultiplePermissionsCreation()
        {
            GrantedTokenResponse grantedToken = null !;
            UmaClient            client       = null !;
            string resourceId = null !;
            string ticketId   = null !;

            "and a valid UMA token".x(
                async() =>
            {
                var tokenClient = new TokenClient(
                    TokenCredentials.FromClientCredentials("clientCredentials", "clientCredentials"),
                    Fixture.Client,
                    new Uri(WellKnownUmaConfiguration));
                var token = await tokenClient.GetToken(TokenRequest.FromScopes("uma_protection"))
                            .ConfigureAwait(false) as Option <GrantedTokenResponse> .Result;
                grantedToken = token !.Item;

                Assert.NotNull(grantedToken);
            });

            "and a properly configured uma client".x(
                () => client = new UmaClient(Fixture.Client, new Uri(WellKnownUmaConfiguration)));

            "when registering resource".x(
                async() =>
            {
                var resource = await client.AddResource(
                    new ResourceSet {
                    Name = "picture", Scopes = new[] { "read", "write" }
                },
                    grantedToken.AccessToken)
                               .ConfigureAwait(false) as Option <AddResourceSetResponse> .Result;
                resourceId = resource !.Item.Id;

                Assert.NotNull(resourceId);
            });

            "and adding permission".x(
                async() =>
            {
                var response = await client.RequestPermission(
                    grantedToken.AccessToken,
                    CancellationToken.None,
                    new PermissionRequest {
                    ResourceSetId = resourceId, Scopes = new[] { "write" }
                },
                    new PermissionRequest {
                    ResourceSetId = resourceId, Scopes = new[] { "read" }
                })
                               .ConfigureAwait(false) as Option <TicketResponse> .Result;

                ticketId = response !.Item.TicketId;

                Assert.NotNull(ticketId);
            });

            "then returns ticket id".x(() => { Assert.NotNull(ticketId); });
        }
        public async Task When_Revoking_RefreshToken_Then_True_Is_Returned()
        {
            var tokenClient = new TokenClient(
                TokenCredentials.FromClientCredentials("client", "client"),
                _server.Client,
                new Uri(BaseUrl + WellKnownOpenidConfiguration));
            var result = await tokenClient
                         .GetToken(TokenRequest.FromPassword("administrator", "password", new[] { "scim", "offline" }))
                         .ConfigureAwait(false) as Option <GrantedTokenResponse> .Result;

            var revoke = await tokenClient
                         .RevokeToken(RevokeTokenRequest.Create(result.Item.RefreshToken, TokenTypes.RefreshToken))
                         .ConfigureAwait(false);

            var introspectClient = new UmaClient(_server.Client, new Uri(BaseUrl + WellKnownOpenidConfiguration));
            var ex = await introspectClient.Introspect(
                IntrospectionRequest.Create(result.Item.RefreshToken, TokenTypes.RefreshToken, "pat"))
                     .ConfigureAwait(false);

            Assert.IsType <Option.Success>(revoke);
            Assert.IsType <Option <UmaIntrospectionResponse> .Error>(ex);
        }
Beispiel #4
0
 public DataController(UmaClient umaClient)
 {
     _umaClient = umaClient;
 }
        public void CanRegisterAResourceForUserAndManagePolicies()
        {
            TokenClient            client              = null !;
            UmaClient              umaClient           = null !;
            GrantedTokenResponse   token               = null !;
            AddResourceSetResponse resourceSetResponse = null !;
            EditPolicyResponse     policyRules         = null !;

            "Given a token client".x(
                () =>
            {
                client = new TokenClient(
                    TokenCredentials.FromClientCredentials("clientCredentials", "clientCredentials"),
                    _fixture.Client,
                    new Uri(WellKnownOpenidConfiguration));
            });

            "And a UMA client".x(() => { umaClient = new UmaClient(_fixture.Client, new Uri(BaseUrl)); });

            "When getting a PAT token".x(
                async() =>
            {
                var response = await client.GetToken(
                    TokenRequest.FromPassword("administrator", "password", new[] { "uma_protection" }))
                               .ConfigureAwait(false) as Option <GrantedTokenResponse> .Result;
                token = response.Item;

                Assert.NotNull(token);
            });

            "Then can register a resource".x(
                async() =>
            {
                var resource = new ResourceSet
                {
                    AuthorizationPolicies = new[]
                    {
                        new PolicyRule
                        {
                            ClientIdsAllowed             = new[] { "clientCredentials" },
                            IsResourceOwnerConsentNeeded = true,
                            Scopes = new[] { "read" }
                        }
                    },
                    Name   = "test resource",
                    Scopes = new[] { "read" },
                    Type   = "test"
                };
                var response = await umaClient.AddResource(resource, token.AccessToken).ConfigureAwait(false) as Option <AddResourceSetResponse> .Result;

                Assert.NotNull(response);

                resourceSetResponse = response.Item;
            });

            "And can view resource policies".x(
                async() =>
            {
                var msg = new HttpRequestMessage
                {
                    Method     = HttpMethod.Get,
                    RequestUri = new Uri(resourceSetResponse.UserAccessPolicyUri)
                };
                msg.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
                msg.Headers.Authorization = new AuthenticationHeaderValue("Bearer", token.AccessToken);

                var policyResponse = await _fixture.Client().SendAsync(msg).ConfigureAwait(false);

                Assert.True(policyResponse.IsSuccessStatusCode);

                var content = await policyResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
                policyRules = JsonConvert.DeserializeObject <EditPolicyResponse>(content);

                Assert.Single(policyRules !.Rules);
            });

            "And can update resource policies".x(
                async() =>
            {
                policyRules.Rules[0] = policyRules.Rules[0] with {
                    IsResourceOwnerConsentNeeded = false
                };

                var msg = new HttpRequestMessage
                {
                    Method     = HttpMethod.Put,
                    RequestUri = new Uri(resourceSetResponse.UserAccessPolicyUri),
                    Content    = new StringContent(JsonConvert.SerializeObject(policyRules))
                };
                msg.Headers.Authorization = new AuthenticationHeaderValue("Bearer", token.AccessToken);

                var policyResponse = await _fixture.Client().SendAsync(msg).ConfigureAwait(false);

                Assert.True(policyResponse.IsSuccessStatusCode);
            });
        }
Beispiel #6
0
 public PermissionFixture(ITestOutputHelper outputHelper)
 {
     _server    = new TestUmaServer(outputHelper);
     _umaClient = new UmaClient(_server.Client, new Uri(BaseUrl + WellKnownUma2Configuration));
 }
        public void SuccessfulPermissionCreation()
        {
            TestServerFixture    fixture      = null !;
            GrantedTokenResponse grantedToken = null !;
            UmaClient            client       = null !;
            string resourceId = null !;
            string ticketId   = null !;

            "Given a running auth server".x(() => fixture = new TestServerFixture(_outputHelper, BaseUrl))
            .Teardown(() => fixture.Dispose());

            "and the server's signing key".x(
                async() =>
            {
                var json = await fixture.Client().GetStringAsync(BaseUrl + "/jwks").ConfigureAwait(false);
                var jwks = new JsonWebKeySet(json);

                Assert.NotEmpty(jwks.Keys);
            });

            "and a valid UMA token".x(
                async() =>
            {
                var tokenClient = new TokenClient(
                    TokenCredentials.FromClientCredentials("clientCredentials", "clientCredentials"),
                    fixture.Client,
                    new Uri(WellKnownUmaConfiguration));
                var token = await tokenClient.GetToken(TokenRequest.FromScopes("uma_protection"))
                            .ConfigureAwait(false) as Option <GrantedTokenResponse> .Result;
                var handler   = new JwtSecurityTokenHandler();
                var principal = handler.ReadJwtToken(token.Item.AccessToken);
                Assert.NotNull(principal.Issuer);
                grantedToken = token.Item;
            });

            "and a properly configured uma client".x(
                () => client = new UmaClient(fixture.Client, new Uri(WellKnownUmaConfiguration)));

            "when registering resource".x(
                async() =>
            {
                var resource = await client.AddResource(
                    new ResourceSet {
                    Name = "picture", Scopes = new[] { "read" }
                },
                    grantedToken.AccessToken)
                               .ConfigureAwait(false) as Option <AddResourceSetResponse> .Result;
                resourceId = resource.Item.Id;
            });

            "and adding permission".x(
                async() =>
            {
                var response = await client.RequestPermission(
                    grantedToken.AccessToken,
                    requests: new PermissionRequest {
                    IdToken = grantedToken.IdToken, ResourceSetId = resourceId, Scopes = new[] { "read" }
                })
                               .ConfigureAwait(false) as Option <TicketResponse> .Result;

                Assert.NotNull(response);

                ticketId = response.Item.TicketId;
            });

            "then returns ticket id".x(() => { Assert.NotNull(ticketId); });
        }
        public void SuccessfulTicketAuthentication()
        {
            GrantedTokenResponse   umaToken            = null !;
            AddResourceSetResponse resourceSetResponse = null !;
            UmaClient            umaClient             = null !;
            TokenClient          client = null !;
            GrantedTokenResponse result = null !;
            string ticketId             = null !;

            "and a properly configured token client".x(
                () => client = new TokenClient(
                    TokenCredentials.FromClientCredentials("post_client", "post_client"),
                    _fixture.Client,
                    new Uri(WellKnownOpenidConfiguration)));

            "when requesting token".x(
                async() =>
            {
                var response = await client
                               .GetToken(TokenRequest.FromPassword("user", "password", new[] { "uma_protection", "offline" }))
                               .ConfigureAwait(false) as Option <GrantedTokenResponse> .Result;
                result = response.Item;
            });

            "then has valid access token".x(
                () =>
            {
                var tokenHandler         = new JwtSecurityTokenHandler();
                var validationParameters = new TokenValidationParameters
                {
                    IssuerSigningKeys = _jwks.GetSigningKeys(),
                    ValidAudience     = "post_client",
                    ValidIssuer       = "https://localhost"
                };
                tokenHandler.ValidateToken(result.AccessToken, validationParameters, out var token);

                Assert.NotEmpty(((JwtSecurityToken)token).Claims);
            });

            "given a uma client".x(
                () =>
            {
                umaClient = new UmaClient(
                    _fixture.Client,
                    new Uri("https://localhost/.well-known/uma2-configuration"));
            });

            "when creating resource set".x(
                async() =>
            {
                var resourceSet = new ResourceSet {
                    Name = "Local", Scopes = new[] { "api1" }, Type = "url",
                };

                var resourceResponse =
                    await umaClient.AddResource(resourceSet, result.AccessToken).ConfigureAwait(false) as
                    Option <AddResourceSetResponse> .Result;
                resourceSetResponse = resourceResponse.Item;

                Assert.NotNull(resourceResponse);
            });

            "and setting access policy".x(
                async() =>
            {
                var resourceSet = new ResourceSet
                {
                    Id     = resourceSetResponse.Id,
                    Name   = "Local",
                    Scopes = new[] { "api1" },
                    Type   = "url",
                    AuthorizationPolicies = new[]
                    {
                        new PolicyRule
                        {
                            Scopes = new[] { "api1" },
                            Claims = new[]
                            {
                                new ClaimData {
                                    Type = ClaimTypes.NameIdentifier, Value = "user"
                                }
                            },
                            ClientIdsAllowed             = new[] { "post_client" },
                            IsResourceOwnerConsentNeeded = false
                        }
                    }
                };
                var resourceResponse =
                    await umaClient.UpdateResource(resourceSet, result.AccessToken).ConfigureAwait(false) as
                    Option <UpdateResourceSetResponse> .Result;

                Assert.NotNull(resourceResponse);
            });

            "then can get redirection".x(
                async() =>
            {
                var request = new HttpRequestMessage
                {
                    Method     = HttpMethod.Get,
                    RequestUri = new Uri("http://localhost/data/" + resourceSetResponse.Id)
                };
                request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", result.AccessToken);

                var response = await _fixture.Client().SendAsync(request).ConfigureAwait(false);

                Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode);
                var httpHeaderValueCollection = response.Headers.WwwAuthenticate;
                Assert.True(httpHeaderValueCollection != null);

                var match = Regex.Match(
                    httpHeaderValueCollection.First().Parameter,
                    ".+ticket=\"(.+)\".*",
                    RegexOptions.Compiled);
                ticketId = match.Groups[1].Value;
            });

            "when requesting token".x(
                async() =>
            {
                var response = await client.GetToken(TokenRequest.FromTicketId(ticketId, result.IdToken))
                               .ConfigureAwait(false) as Option <GrantedTokenResponse> .Result;
                umaToken = response.Item;

                Assert.NotNull(umaToken.AccessToken);
            });

            "then can get resource with token".x(
                async() =>
            {
                var request = new HttpRequestMessage
                {
                    Method     = HttpMethod.Get,
                    RequestUri = new Uri("http://localhost/data/" + resourceSetResponse.Id)
                };
                request.Headers.Authorization = new AuthenticationHeaderValue(
                    umaToken.TokenType,
                    umaToken.AccessToken);
                var response = await _fixture.Client().SendAsync(request).ConfigureAwait(false);
                var content  = await response.Content.ReadAsStringAsync().ConfigureAwait(false);

                Assert.Equal(HttpStatusCode.OK, response.StatusCode);
                Assert.Equal("\"Hello\"", content);
            });
        }
        public void UnsuccessfulTicketAuthentication()
        {
            Option <GrantedTokenResponse> ticketResponse      = null !;
            AddResourceSetResponse        resourceSetResponse = null !;
            UmaClient            umaClient = null !;
            TokenClient          client    = null !;
            GrantedTokenResponse result    = null !;
            string ticketId = null !;

            "and a properly configured token client".x(
                () => client = new TokenClient(
                    TokenCredentials.FromClientCredentials("post_client", "post_client"),
                    _fixture.Client,
                    new Uri(WellKnownOpenidConfiguration)));

            "when requesting token".x(
                async() =>
            {
                var response = await client
                               .GetToken(TokenRequest.FromPassword("user", "password", new[] { "uma_protection" }))
                               .ConfigureAwait(false) as Option <GrantedTokenResponse> .Result;
                result = response.Item;
            });

            "then has valid access token".x(
                () =>
            {
                var tokenHandler         = new JwtSecurityTokenHandler();
                var validationParameters = new TokenValidationParameters
                {
                    IssuerSigningKeys = _jwks.GetSigningKeys(),
                    ValidAudience     = "post_client",
                    ValidIssuer       = "https://localhost"
                };
                tokenHandler.ValidateToken(result.AccessToken, validationParameters, out var token);

                Assert.NotEmpty(((JwtSecurityToken)token).Claims);
            });

            "given a uma client".x(
                () =>
            {
                umaClient = new UmaClient(
                    _fixture.Client,
                    new Uri("https://localhost/.well-known/uma2-configuration"));
            });

            "when creating resource set with deviating scopes".x(
                async() =>
            {
                var resourceSet = new ResourceSet
                {
                    Name   = "Local",
                    Scopes = new[] { "api1" },
                    Type   = "url",
                    AuthorizationPolicies = new[]
                    {
                        new PolicyRule
                        {
                            Scopes = new[] { "anotherApi" },
                            Claims = new[] { new ClaimData {
                                                 Type = "sub", Value = "user"
                                             } },
                            ClientIdsAllowed             = new[] { "post_client" },
                            IsResourceOwnerConsentNeeded = false
                        }
                    }
                };

                var resourceResponse =
                    await umaClient.AddResource(resourceSet, result.AccessToken).ConfigureAwait(false) as
                    Option <AddResourceSetResponse> .Result;

                Assert.NotNull(resourceResponse);

                resourceSetResponse = resourceResponse.Item;
            });

            "and requesting permission ticket".x(
                async() =>
            {
                var permission =
                    new PermissionRequest {
                    ResourceSetId = resourceSetResponse.Id, Scopes = new[] { "api1" }
                };
                var permissionResponse = await umaClient.RequestPermission(result.AccessToken, requests: permission)
                                         .ConfigureAwait(false) as Option <TicketResponse> .Result;

                Assert.NotNull(permissionResponse);

                ticketId = permissionResponse.Item.TicketId;
            });

            "and requesting token from ticket".x(
                async() =>
            {
                ticketResponse = await client.GetToken(TokenRequest.FromTicketId(ticketId, result.IdToken))
                                 .ConfigureAwait(false);
            });

            "then has error".x(() => { Assert.IsType <Option <GrantedTokenResponse> .Error>(ticketResponse); });
        }
        public void DefaultPolicyTicketAuthentication()
        {
            AddResourceSetResponse resourceSetResponse = null !;
            UmaClient            umaClient             = null !;
            TokenClient          client = null !;
            GrantedTokenResponse result = null !;
            string ticketId             = null !;

            "and a properly configured token client".x(
                () => client = new TokenClient(
                    TokenCredentials.FromClientCredentials("post_client", "post_client"),
                    _fixture.Client,
                    new Uri(WellKnownOpenidConfiguration)));

            "when requesting token".x(
                async() =>
            {
                var response = await client
                               .GetToken(TokenRequest.FromPassword("user", "password", new[] { "uma_protection" }))
                               .ConfigureAwait(false) as Option <GrantedTokenResponse> .Result;
                result = response.Item;
            });

            "then has valid access token".x(
                () =>
            {
                var tokenHandler         = new JwtSecurityTokenHandler();
                var validationParameters = new TokenValidationParameters
                {
                    IssuerSigningKeys = _jwks.GetSigningKeys(),
                    ValidAudience     = "post_client",
                    ValidIssuer       = "https://localhost"
                };
                tokenHandler.ValidateToken(result.AccessToken, validationParameters, out var token);

                Assert.NotEmpty(((JwtSecurityToken)token).Claims);
            });

            "given a uma client".x(
                () => { umaClient = new UmaClient(_fixture.Client, new Uri("https://localhost/")); });

            "when creating resource set without a policy".x(
                async() =>
            {
                var resourceSet = new ResourceSet
                {
                    Name = "Local", Scopes = new[] { "api1" }, Type = "url", AuthorizationPolicies = null
                };

                var resourceResponse =
                    await umaClient.AddResource(resourceSet, result.AccessToken).ConfigureAwait(false) as
                    Option <AddResourceSetResponse> .Result;
                resourceSetResponse = resourceResponse.Item;

                Assert.NotNull(resourceResponse);
            });

            "then can get redirection".x(
                async() =>
            {
                var request = new HttpRequestMessage
                {
                    Method     = HttpMethod.Get,
                    RequestUri = new Uri("http://localhost/data/" + resourceSetResponse.Id)
                };
                request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", result.AccessToken);

                var response = await _fixture.Client().SendAsync(request).ConfigureAwait(false);

                Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode);
                var httpHeaderValueCollection = response.Headers.WwwAuthenticate;
                Assert.True(httpHeaderValueCollection != null);

                var match = Regex.Match(
                    httpHeaderValueCollection.First().Parameter,
                    ".+ticket=\"(.+)\".*",
                    RegexOptions.Compiled);
                ticketId = match.Groups[1].Value;
            });

            "when requesting token".x(
                async() =>
            {
                var response = await client.GetToken(TokenRequest.FromTicketId(ticketId, result.IdToken))
                               .ConfigureAwait(false);

                Assert.IsType <Option <GrantedTokenResponse> .Error>(response);
            });
        }
Beispiel #11
0
        public void CanGetUserInfoFromPatToken()
        {
            TokenClient client     = null !;
            UmaClient   umaClient  = null !;
            string      patToken   = null !;
            string      idToken    = null !;
            string      ticketId   = null !;
            string      rptToken   = null !;
            string      resourceId = null !;

            "Given a token client".x(
                () =>
            {
                client = new TokenClient(
                    TokenCredentials.FromClientCredentials("clientCredentials", "clientCredentials"),
                    _fixture.Client,
                    new Uri(WellKnownOpenidConfiguration));
            });

            "and a UMA client".x(() => { umaClient = new UmaClient(_fixture.Client, new Uri(BaseUrl)); });

            "and a PAT token".x(
                async() =>
            {
                var response = await client.GetToken(
                    TokenRequest.FromPassword("administrator", "password", new[] { "uma_protection" }))
                               .ConfigureAwait(false) as Option <GrantedTokenResponse> .Result;

                Assert.NotNull(response);
                Assert.NotNull(response.Item.AccessToken);
                Assert.NotNull(response.Item.IdToken);

                patToken = response.Item.AccessToken;
                idToken  = response.Item.IdToken;
            });

            "and a registered resource".x(
                async() =>
            {
                var resourceSet = new ResourceSet
                {
                    Description = "Test resource",
                    Name        = "Test resource",
                    Scopes      = new[] { "read" },
                    Type        = "Test resource"
                };
                var response =
                    await umaClient.AddResource(resourceSet, patToken).ConfigureAwait(false) as
                    Option <AddResourceSetResponse> .Result;

                Assert.NotNull(response);

                resourceId = response.Item.Id;
            });

            "and an updated authorization policy".x(
                async() =>
            {
                var resourceSet = new ResourceSet
                {
                    Id = resourceId,
                    AuthorizationPolicies =
                        new[]
                    {
                        new PolicyRule
                        {
                            ClientIdsAllowed = new[] { "clientCredentials" }, Scopes = new[] { "read" }
                        }
                    },
                    Description = "Test resource",
                    Name        = "Test resource",
                    Scopes      = new[] { "read" },
                    Type        = "Test resource"
                };
                var response =
                    await umaClient.UpdateResource(resourceSet, patToken).ConfigureAwait(false) as
                    Option <UpdateResourceSetResponse> .Result;

                Assert.NotNull(response);

                resourceId = response.Item.Id;
            });

            "When getting a ticket".x(
                async() =>
            {
                var ticketResponse = await umaClient.RequestPermission(
                    patToken,
                    requests: new PermissionRequest {
                    ResourceSetId = resourceId, Scopes = new[] { "read" }
                })
                                     .ConfigureAwait(false) as Option <TicketResponse> .Result;

                Assert.NotNull(ticketResponse);

                ticketId = ticketResponse.Item.TicketId;
            });

            "and getting an RPT token".x(
                async() =>
            {
                var rptResponse = await client.GetToken(TokenRequest.FromTicketId(ticketId, idToken))
                                  .ConfigureAwait(false) as Option <GrantedTokenResponse> .Result;

                Assert.NotNull(rptResponse);

                rptToken = rptResponse.Item.AccessToken;
            });

            "then can introspect RPT token using PAT token as authentication".x(
                async() =>
            {
                var introspectResult = await umaClient
                                       .Introspect(IntrospectionRequest.Create(rptToken, "access_token", patToken))
                                       .ConfigureAwait(false);

                Assert.IsType <Option <UmaIntrospectionResponse> .Result>(introspectResult);
            });
        }
Beispiel #12
0
 public TokenFixture(ITestOutputHelper outputHelper)
 {
     IdentityModelEventSource.ShowPII = true;
     _server    = new TestUmaServer(outputHelper);
     _umaClient = new UmaClient(_server.Client, new Uri(BaseUrl + WellKnownUma2Configuration));
 }