KEYCLOAK-18334 Fix null pointer exception when viewing flow executions (#8121)

* KEYCLOAK-18334 Fix null pointer exception when viewing flow executions
Closes #10371
This commit is contained in:
treydock 2022-02-22 03:31:25 -05:00 committed by GitHub
parent 7fdd18ac86
commit b26a1a4803
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -566,6 +566,10 @@ public class AuthenticationManagementResource {
} else { } else {
String providerId = execution.getAuthenticator(); String providerId = execution.getAuthenticator();
ConfigurableAuthenticatorFactory factory = CredentialHelper.getConfigurableAuthenticatorFactory(session, providerId); ConfigurableAuthenticatorFactory factory = CredentialHelper.getConfigurableAuthenticatorFactory(session, providerId);
if (factory == null) {
logger.warnf("Cannot find authentication provider implementation with provider ID '%s'", providerId);
throw new NotFoundException("Could not find authenticator provider");
}
rep.setDisplayName(factory.getDisplayType()); rep.setDisplayName(factory.getDisplayType());
rep.setConfigurable(factory.isConfigurable()); rep.setConfigurable(factory.isConfigurable());
for (AuthenticationExecutionModel.Requirement choice : factory.getRequirementChoices()) { for (AuthenticationExecutionModel.Requirement choice : factory.getRequirementChoices()) {