Remove duplicated code on test_v3_auth

Try to be a bit more DRYer in the external authentication testing part.

Change-Id: I295a952fabf923d084daee14a154cb6ac5b7838b
Merge "Remove duplicated code on test_v3_auth"