stubbing in legacy authentication