diff --git a/http/oidc/src/main/java/org/wildfly/security/http/oidc/OidcHttpFacade.java b/http/oidc/src/main/java/org/wildfly/security/http/oidc/OidcHttpFacade.java index d27a3a9f200..a4c1b94bc1d 100644 --- a/http/oidc/src/main/java/org/wildfly/security/http/oidc/OidcHttpFacade.java +++ b/http/oidc/src/main/java/org/wildfly/security/http/oidc/OidcHttpFacade.java @@ -121,8 +121,7 @@ public Principal getPrincipal() { SecurityIdentityCallback securityIdentityCallback = new SecurityIdentityCallback(); IdentityCredentialCallback credentialCallback = new IdentityCredentialCallback(new BearerTokenCredential(OidcPrincipal.class.cast(principal).getOidcSecurityContext().getTokenString()), true); callbackHandler.handle(new Callback[]{credentialCallback, AuthenticationCompleteCallback.SUCCEEDED, securityIdentityCallback}); - SecurityIdentity securityIdentity = securityIdentityCallback.getSecurityIdentity(); - return securityIdentity; + return securityIdentityCallback.getSecurityIdentity(); } } catch (UnsupportedCallbackException | IOException e) { throw new RuntimeException(e);