public async Task GetProtocolMappersInTokenGenerationAsync(string realm, string clientId) { var clients = await ClientsClient.GetClientsAsync(realm); string clientsId = clients.FirstOrDefault(x => x.ClientId == clientId)?.Id; if (clientsId != null) { var result = await ClientsClient.GetProtocolMappersInTokenGenerationAsync(realm, clientsId); Assert.NotNull(result); } }
public async Task GetEffectiveRealmRolesForClientScopeForClientAsync(string realm) { var clients = await ClientsClient.GetClientsAsync(realm); string clientId = clients.FirstOrDefault()?.Id; if (clientId != null) { var result = await ScopeMappingsClient.GetEffectiveRealmRolesForClientScopeForClientAsync(realm, clientId); Assert.NotNull(result); } }
public async Task GetRolesForClientAsync(string realm, string clientId) { var clients = await ClientsClient.GetClientsAsync(realm); string clientsId = clients.FirstOrDefault(x => x.ClientId == clientId)?.Id; if (clientsId != null) { var result = await RolesClient.GetRolesAsync(realm, clientsId); Assert.NotNull(result); } }
public async Task TestClientClusterNodesAvailableAsync(string realm, string clientId) { var clients = await ClientsClient.GetClientsAsync(realm); string clientsId = clients.FirstOrDefault(x => x.ClientId == clientId)?.Id; if (clientsId != null) { var result = await ClientsClient.TestClientClusterNodesAvailableAsync(realm, clientsId); Assert.NotNull(result); } }
public async Task GenerateClientExampleAccessTokenAsync(string realm, string clientId) { var clients = await ClientsClient.GetClientsAsync(realm); string clientsId = clients.FirstOrDefault(x => x.ClientId == clientId)?.Id; if (clientsId != null) { var result = await ClientsClient.GenerateClientExampleAccessTokenAsync(realm, clientsId); Assert.NotNull(result); } }
public async Task GetClientSessionCountAsync(string realm, string clientId) { var clients = await ClientsClient.GetClientsAsync(realm); string clientsId = clients.FirstOrDefault(x => x.ClientId == clientId)?.Id; if (clientsId != null) { int?result = await ClientsClient.GetClientSessionCountAsync(realm, clientsId); Assert.True(result >= 0); } }
public async Task GetClientAuthorizationPermissionsInitializedAsync(string realm, string clientId) { var clients = await ClientsClient.GetClientsAsync(realm); string clientsId = clients.FirstOrDefault(x => x.ClientId == clientId)?.Id; if (clientsId != null) { var result = await ClientsClient.GetClientAuthorizationPermissionsInitializedAsync(realm, clientsId); Assert.NotNull(result); } }
public async Task GetKeyInfoAsync(string realm) { var clients = await ClientsClient.GetClientsAsync(realm); (string clientId, string attribute) = clients .Where(x => x.Attributes.Any()) .Select(client => (client.Id, client.Attributes.FirstOrDefault().Key)) .FirstOrDefault(); if (clientId != null) { var result = await ClientAttributeCertificateClient.GetKeyInfoAsync(realm, clientId, attribute); Assert.NotNull(result); } }
public async Task GetClientNotGrantedScopeMappingsAsync(string realm, string clientId) { var clients = await ClientsClient.GetClientsAsync(realm); string clientsId = clients.FirstOrDefault(x => x.ClientId == clientId)?.Id; if (clientsId != null) { var result = await ClientsClient.GetClientNotGrantedScopeMappingsAsync(realm, clientsId, realm); Assert.NotNull(result); result = await ClientsClient.GetClientNotGrantedScopeMappingsAsync(realm, clientsId, clientsId); Assert.NotNull(result); } }
public async Task GetAvailableClientRolesForClientScopeAsync(string realm) { var clientScopes = await ClientScopesClient.GetClientScopesAsync(realm); string clientScopeId = clientScopes.FirstOrDefault()?.Id; if (clientScopeId != null) { var clients = await ClientsClient.GetClientsAsync(realm); string clientId = clients.FirstOrDefault()?.Id; if (clientId != null) { var result = await ScopeMappingsClient.GetAvailableClientRolesForClientScopeAsync(realm, clientScopeId, clientId); Assert.NotNull(result); } } }
public async Task GetClientRolesForCompositeByIdAsync(string realm, string clientId) { var roles = await RolesClient.GetRolesAsync(realm); string roleId = roles.FirstOrDefault()?.Id; if (roleId != null) { var clients = await ClientsClient.GetClientsAsync(realm); string clientsId = clients.FirstOrDefault(x => x.ClientId == clientId)?.Id; if (clientsId != null) { var result = await RolesByIdClient.GetClientRolesForCompositeByIdAsync(realm, roleId, clientsId); Assert.NotNull(result); } } }
public async Task GetAvailableClientRoleMappingsForUserAsync(string realm, string clientId) { var users = await UsersClient.GetUsersAsync(realm); string userId = users.FirstOrDefault()?.Id; if (userId != null) { var clients = await ClientsClient.GetClientsAsync(realm); string clientsId = clients.FirstOrDefault(x => x.ClientId == clientId)?.Id; if (clientId != null) { var result = await ClientRoleMappingsClient.GetAvailableClientRoleMappingsForUserAsync(realm, userId, clientsId); Assert.NotNull(result); } } }
public async Task GetEffectiveClientRoleMappingsForGroupAsync(string realm, string clientId) { var groups = await GroupsClient.GetGroupHierarchyAsync(realm); string groupId = groups.FirstOrDefault()?.Id; if (groupId != null) { var clients = await ClientsClient.GetClientsAsync(realm); string clientsId = clients.FirstOrDefault(x => x.ClientId == clientId)?.Id; if (clientId != null) { var result = await ClientRoleMappingsClient.GetEffectiveClientRoleMappingsForGroupAsync(realm, groupId, clientsId); Assert.NotNull(result); } } }
public async Task GetApplicationRolesForCompositeForClientAsync(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.GetApplicationRolesForCompositeAsync(realm, clientsId, roleName, clientsId); Assert.NotNull(result); } } }
public async Task GetClientProviderAsync(string realm, string clientId) { var clients = await ClientsClient.GetClientsAsync(realm); string clientsId = clients.FirstOrDefault(x => x.ClientId == clientId)?.Id; if (clientsId != null) { var providerInstances = await IdentityProvidersClient.GetIdentityProviderInstancesAsync(realm); string providerInstanceId = providerInstances.FirstOrDefault()?.ProviderId; if (providerInstanceId != null) { string result = await ClientsClient.GetClientProviderAsync(realm, clientsId, providerInstanceId); Assert.NotNull(result); } } }
public async Task GetClientsAsync(string realm) { var result = await ClientsClient.GetClientsAsync(realm); Assert.NotNull(result); }