8000 Fixing SSSD LoginPage and ApiUtil changes not propagated from recent base package updates. by lhanusov · Pull Request #47949 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public static void loadSSSDConfiguration() throws ConfigurationException {
}

protected void testLoginFailure(String username, String password) {
loginPage.open();
oauth.openLoginForm();
loginPage.login(username, password);
loginPage.assertCurrent();
Assert.assertEquals("Invalid username or password.", loginPage.getInputError());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
import org.keycloak.representations.userprofile.config.UPAttributeRequired;
import org.keycloak.representations.userprofile.config.UPConfig;
import org.keycloak.storage.UserStorageProvider;
import org.keycloak.testsuite.admin.ApiUtil;
import org.keycloak.testsuite.admin.AdminApiUtil;
import org.keycloak.testsuite.pages.AppPage;
import org.keycloak.testsuite.util.oauth.AccessTokenResponse;
import org.keycloak.testsuite.util.WaitUtils;
Expand Down Expand Up @@ -86,7 +86,7 @@ public void test02DefaultSSSDUserProfile() throws Exception {
// default configuration adds all sssd attributes
// check they are read-only in both admin and user for a SSSD user
String username = getUsername();
UserResource userResource = ApiUtil.findUserByUsernameId(testRealm(), username);
UserResource userResource = AdminApiUtil.findUserByUsernameId(testRealm(), username);
UserRepresentation user = userResource.toRepresentation(true);

// for admin the four should be read-only
Expand Down Expand Up @@ -130,7 +130,7 @@ public void test02DefaultSSSDUserProfile() throws Exception {
@Test
public void test03DefaultInternalDBUserProfile() throws Exception {
// check non sssd user has normal atttributes enabled
UserResource testResource = ApiUtil.findUserByUsernameId(testRealm(), "test-user@localhost");
UserResource testResource = AdminApiUtil.findUserByUsernameId(testRealm(), "test-user@localhost");
UserRepresentation test = testResource.toRepresentation(true);

// for admin the four should be editable
Expand Down Expand Up @@ -180,7 +180,7 @@ public void test04MixedSSSDUserProfile() throws Exception {
// for admin all attributes are added as read-only and postal_code remains editable
String username = getUsername();
String sssdId = getSssdProviderId();
UserResource userResource = ApiUtil.findUserByUsernameId(testRealm(), username);
UserResource userResource = AdminApiUtil.findUserByUsernameId(testRealm(), username);
UserRepresentation user = userResource.toRepresentation(true);
// first and last names are removed from the UP config (unmanaged) and are not available from the representation
assertUser(user, username, getEmail(username), null, null, sssdId);
Expand Down Expand Up @@ -231,7 +231,7 @@ public void test05MixedInternalDBUserProfile() throws Exception {
createMixedUPConfiguration();

// for admin firstName and lastName remains removed, the rest editable
UserResource testResource = ApiUtil.findUserByUsernameId(testRealm(), "test-user@localhost");
UserResource testResource = AdminApiUtil.findUserByUsernameId(testRealm(), "test-user@localhost");
UserRepresentation test = testResource.toRepresentation(true);
assertUser(test, "test-user@localhost", "test-user@localhost", null, null, null);
assertProfileAttributes(test, null, false, "username", "email", "postal_code");
Expand Down
Loading
0