Correct mechanism in cpp authentication example