code: protected AuthenticationHandlerExecutionResult createAuthenticatedSubjectResult(final Credential credential, final Subject currentUser) {
          val username = currentUser.getPrincipal().toString();
          return createHandlerResult(credential, this.principalFactory.createPrincipal(username));
      }
docs: Create authenticated subject result.
  
  @param credential  the credential
  @param currentUser the current user
  @return the handler result