예제 #1
0
        public async Task GetRealmRoleMappingsForUserAsync(string realm)
        {
            var users = await UsersClient.GetUsersAsync(realm);

            string userId = users.FirstOrDefault()?.Id;

            if (userId != null)
            {
                var result = await RoleMapperClient.GetRealmRoleMappingsForUserAsync(realm, userId);

                Assert.NotNull(result);
            }
        }
예제 #2
0
        public async Task GetEffectiveRealmRoleMappingsForGroupAsync(string realm)
        {
            var groups = await GroupsClient.GetGroupHierarchyAsync(realm);

            string groupId = groups.FirstOrDefault()?.Id;

            if (groupId != null)
            {
                var result = await RoleMapperClient.GetEffectiveRealmRoleMappingsForGroupAsync(realm, groupId);

                Assert.NotNull(result);
            }
        }