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,10 +509,13 @@ 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());
|
||||
if (authenticatorConfig != null) {
|
||||
rep.setAlias(authenticatorConfig.getAlias());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue