Add more tests to new authentication framework

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=148459400
This commit is contained in:
mountford 2017-02-24 07:37:15 -08:00 committed by Ben McIlwain
parent dd400f30f5
commit 3ac74fa449
4 changed files with 353 additions and 28 deletions

View file

@ -154,7 +154,7 @@ public class RequestAuthenticator {
checkArgument(
Ordering.explicit(Auth.AuthMethod.INTERNAL, Auth.AuthMethod.API, Auth.AuthMethod.LEGACY)
.isStrictlyOrdered(authMethods),
"Auth methods must be strictly in order - INTERNAL, API, LEGACY");
"Auth methods must be unique and strictly in order - INTERNAL, API, LEGACY");
checkArgument(
authMethods.contains(Auth.AuthMethod.INTERNAL),
"Auth method INTERNAL must always be specified, and as the first auth method");