KEYCLOAK-5274: Check that authenticator config id is null before attempting to fetch it. (#4404)
This commit is contained in:
parent
83d3dfbc54
commit
5b179420fd
1 changed files with 6 additions and 3 deletions
|
@ -509,12 +509,15 @@ public class AuthenticationManagementResource {
|
|||
rep.setId(execution.getId());
|
||||
|
||||
if (factory.isConfigurable()) {
|
||||
AuthenticatorConfigModel authenticatorConfig = realm.getAuthenticatorConfigById(execution.getAuthenticatorConfig());
|
||||
String authenticatorConfigId = execution.getAuthenticatorConfig();
|
||||
if(authenticatorConfigId != null) {
|
||||
AuthenticatorConfigModel authenticatorConfig = realm.getAuthenticatorConfigById(authenticatorConfigId);
|
||||
|
||||
if (authenticatorConfig != null) {
|
||||
rep.setAlias(authenticatorConfig.getAlias());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rep.setRequirement(execution.getRequirement().name());
|
||||
rep.setProviderId(execution.getAuthenticator());
|
||||
|
|
Loading…
Reference in a new issue