code: public static boolean validatePassword(BrokerSession session, String password) {
          password = encrypt(password, session.getServerCaps().getCipherKey());
          return session.callRPCBool("RGCWFUSR VALIDPSW", password);
      }
docs: Validates the current user's password.
  
  @param session Broker session.
  @param password Password.
  @return True if the password is valid.