diff --git a/auth/realm/base/src/main/java/org/wildfly/security/auth/realm/AggregateSecurityRealm.java b/auth/realm/base/src/main/java/org/wildfly/security/auth/realm/AggregateSecurityRealm.java index dde1367881..198c5e8331 100644 --- a/auth/realm/base/src/main/java/org/wildfly/security/auth/realm/AggregateSecurityRealm.java +++ b/auth/realm/base/src/main/java/org/wildfly/security/auth/realm/AggregateSecurityRealm.java @@ -79,18 +79,14 @@ public AggregateSecurityRealm(final SecurityRealm authenticationRealm, Function< public RealmIdentity getRealmIdentity(final Evidence evidence) throws RealmUnavailableException { boolean ok = false; final RealmIdentity authenticationIdentity = authenticationRealm.getRealmIdentity(evidence); - if (authenticationIdentity.exists()) { - log.tracef("Authentication identity for principal [%s] found.", evidence.getDecodedPrincipal()); - } + log.tracef("Authentication identity for principal [%s] obtained.", evidence.getDecodedPrincipal()); final RealmIdentity[] authorizationIdentities = new RealmIdentity[authorizationRealms.length]; try { for (int i = 0; i < authorizationIdentities.length; i++) { SecurityRealm authorizationRealm = authorizationRealms[i]; authorizationIdentities[i] = (authorizationRealm == authenticationRealm) ? authenticationIdentity : getAuthorizationIdentity(authorizationRealm, evidence, principalTransformer, authenticationIdentity); - if (authorizationIdentities[i].exists()) { - log.tracef("Authorization identity for principal [%s] found.", evidence.getDecodedPrincipal()); - } + log.tracef("Authorization identity for principal [%s] obtained.", evidence.getDecodedPrincipal()); } final Identity identity = new Identity(authenticationIdentity, authorizationIdentities); @@ -111,9 +107,7 @@ public RealmIdentity getRealmIdentity(final Evidence evidence) throws RealmUnava public RealmIdentity getRealmIdentity(final Principal principal) throws RealmUnavailableException { boolean ok = false; final RealmIdentity authenticationIdentity = authenticationRealm.getRealmIdentity(principal); - if (authenticationIdentity.exists()) { - log.tracef("Authentication identity for principal [%s] found.", principal); - } + log.tracef("Authentication identity for principal [%s] obtained.", principal); Principal authorizationPrincipal = principal; if (principalTransformer != null) { authorizationPrincipal = principalTransformer.apply(authorizationPrincipal); @@ -125,9 +119,7 @@ public RealmIdentity getRealmIdentity(final Principal principal) throws RealmUna for (int i = 0; i < authorizationIdentities.length; i++) { SecurityRealm authorizationRealm = authorizationRealms[i]; authorizationIdentities[i] = (authorizationRealm == authenticationRealm) && (principalTransformer == null) ? authenticationIdentity : authorizationRealm.getRealmIdentity(authorizationPrincipal); - if (authorizationIdentities[i].exists()) { - log.tracef("Authorization identity for principal [%s] found.", principal); - } + log.tracef("Authorization identity for principal [%s] obtained.", principal); } final Identity identity = new Identity(authenticationIdentity, authorizationIdentities);