code: public Subject authenticateUser(AuthenticationService authenticationService, String userName,
                                      String jaasEntryName) throws AuthenticationException
      {
          return authenticateUser(authenticationService, userName, jaasEntryName, null);
      }
docs: Authenticate the given user and return an authenticated Subject.
  
  @param authenticationService service to authenticate a user, must not be null
  @param userName the user to authenticate, must not be null
  @param jaasEntryName the optional JAAS configuration entry name. The system.DEFAULT JAAS entry name will be used if null or empty String is passed
  @return the authenticated subject
  @throws AuthenticationException if there was a problem authenticating the user, or if the userName or authenticationService is null