Remove XsrfTokenManager fallback for validating legacy tokens

This is the third step of migrating to the new format: removing support
for the legacy format.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150512556
This commit is contained in:
nickfelt 2017-03-17 19:52:12 -07:00 committed by Ben McIlwain
parent 09f619cce2
commit 232132eac0
2 changed files with 18 additions and 54 deletions

View file

@ -62,7 +62,12 @@ public class XsrfTokenManagerTest {
@Test
public void testValidate_tokenWithMissingParts() {
assertThat(xsrfTokenManager.validateToken("foo")).isFalse();
assertThat(xsrfTokenManager.validateToken("1:123")).isFalse();
}
@Test
public void testValidate_tokenWithBadVersion() {
assertThat(xsrfTokenManager.validateToken("2:123:base64")).isFalse();
}
@Test