added testcase and sample for reauthorization