use of org.springframework.security.core.token.Token in project spring-security by spring-projects.
the class KeyBasedPersistenceTokenServiceTests method testOperationWithEmptyRandomNumber.
@Test
public void testOperationWithEmptyRandomNumber() {
KeyBasedPersistenceTokenService service = getService();
service.setPseudoRandomNumberBytes(0);
Token token = service.allocateToken("Hello:world:::");
Token result = service.verifyToken(token.getKey());
assertThat(result).isEqualTo(token);
}
Aggregations