withAdminCredentials method

KeycloakContainer withAdminCredentials(
  1. String username,
  2. String password
)

Sets the admin user created at the first start (KC_BOOTSTRAP_ADMIN_USERNAME, KC_BOOTSTRAP_ADMIN_PASSWORD).

Implementation

KeycloakContainer withAdminCredentials(String username, String password) {
  _adminUsername = username;
  _adminPassword = password;
  withEnv('KC_BOOTSTRAP_ADMIN_USERNAME', username);
  withEnv('KC_BOOTSTRAP_ADMIN_PASSWORD', password);
  return this;
}