public function getCsrfProtectionToken()
{
if ($this->initialized === false) {
$this->initialize();
}
if (count($this->csrfProtectionTokens) === 1 && $this->csrfProtectionStrategy !== self::CSRF_ONE_PER_URI) {
reset($this->csrfProtectionTokens);
return key($this->csrfProtectionTokens);
}
$newToken = Algorithms::generateRandomToken(16);
$this->csrfProtectionTokens[$newToken] = true;
return $newToken;
}