GoogleAuth { static boolean checkClientId(String clientId, List<String> allowedClientIds, boolean allowSkipClientIdCheck) { if (Strings.isWhitelisted(clientId, allowedClientIds)) { return true; } if (allowSkipClientIdCheck && !Strings.isEmptyOrNull(allowedClientIds) && allowedClientIds.equals(SKIP_CLIENT_ID_CHECK_LIST)) { return true; } return false; }  static String getAuthToken(HttpServletRequest request); static boolean isJwt(String token); static boolean isOAuth2Token(String token); static TokenInfo getTokenInfoRemote(String token);  }
@Test public void testCheckClientId() { assertFalse(GoogleAuth.checkClientId(CLIENT_ID1, ImmutableList.<String>of(), true)); assertFalse(GoogleAuth.checkClientId(CLIENT_ID1, null, true)); assertFalse(GoogleAuth.checkClientId("", CLIENT_ID_LIST, true)); assertFalse(GoogleAuth.checkClientId(null, CLIENT_ID_LIST, true)); assertTrue( GoogleAuth.checkClientId(CLIENT_ID1, GoogleAuth.SKIP_CLIENT_ID_CHECK_LIST, true)); assertFalse( GoogleAuth.checkClientId(CLIENT_ID1, GoogleAuth.SKIP_CLIENT_ID_CHECK_LIST, false)); assertTrue(GoogleAuth.checkClientId(CLIENT_ID1, CLIENT_ID_LIST, true)); assertFalse(GoogleAuth.checkClientId(CLIENT_ID2, CLIENT_ID_LIST, true)); }