Пример #1
0
        public async Task GetRoleCompositesForRealmAsync(string realm)
        {
            var roles = await RolesClient.GetRolesAsync(realm);

            string roleName = roles.FirstOrDefault()?.Name;

            if (roleName != null)
            {
                var result = await RolesClient.GetRoleCompositesAsync(realm, roleName);

                Assert.NotNull(result);
            }
        }
Пример #2
0
        public async Task GetRoleCompositesForClientAsync(string realm, string clientId)
        {
            var clients = await ClientsClient.GetClientsAsync(realm);

            string clientsId = clients.FirstOrDefault(x => x.ClientId == clientId)?.Id;

            if (clientsId != null)
            {
                var roles = await RolesClient.GetRolesAsync(realm, clientsId);

                string roleName = roles.FirstOrDefault()?.Name;
                if (roleName != null)
                {
                    var result = await RolesClient.GetRoleCompositesAsync(realm, clientsId, roleName);

                    Assert.NotNull(result);
                }
            }
        }