Skip to content

Commit

Permalink
feat!: Forward Disabled Users to Their Home IdP
Browse files Browse the repository at this point in the history
This change ensures that disabled users are redirected to their home IdP,
bypassing execution of subsequent authenticators. The post-broker login
flow and Keycloak's default behavior will now handle these cases, showing
error messages appropriately.

Breaking change: Disabled users are no longer processed by subsequent
authenticators. This behavior avoids unexpected errors and ensures a more
consistent and predictable user experience.

This approach was implemented to delegate error handling to Keycloak's
native logic, improving maintainability and avoiding custom error flows.

Fixes #399

Signed-off-by: Sven-Torben Janus <sven-torben@sven-torben.de>
  • Loading branch information
sventorben committed Jan 15, 2025
1 parent e42f4ee commit 76b1039
Showing 1 changed file with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ final class DomainExtractor {
}

Optional<Domain> extractFrom(UserModel user) {
if (!user.isEnabled()) {
LOG.warnf("User '%s' not enabled", user.getId());
return Optional.empty();
}
String userAttribute = user.getFirstAttribute(config.userAttribute());
if (userAttribute == null) {
LOG.warnf("Could not find user attribute '%s' for user '%s'", config.userAttribute(), user.getId());
Expand Down

0 comments on commit 76b1039

Please sign in to comment.