‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Security\NoncePool Class Reference
Inheritance diagram for TYPO3\CMS\Core\Security\NoncePool:
TYPO3\CMS\Core\Security\SigningProviderInterface

Public Member Functions

 __construct (array $nonces=[], array $options=[])
 
 findSigningSecret (string $name)
 
 provideSigningSecret ()
 
 merge (self $other)
 
 purge ()
 
 emit (Nonce $nonce)
 
 revoke (Nonce $nonce)
 
 revokeSigningSecret (string $name)
 
array< string, getEmittableNonces():array { return array_filter( $this->changeItems);} public list< string > function getRevocableNames():array { return array_keys(array_diff_key( $this->changeItems, $this->getEmittableNonces()));} protected function isValidNonceName(Nonce $nonce, $name):bool { return $nonce-> getSigningIdentifier () -> name===$name
 

Protected Member Functions

 isNonceUpToDate (Nonce $nonce)
 

Protected Attributes

const DEFAULT_SIZE = 5
 
const DEFAULT_EXPIRATION = 900
 
array $options
 
array $items
 
array $changeItems = []
 

Detailed Description

Definition at line 23 of file NoncePool.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Security\NoncePool::__construct ( array  $nonces = [],
array  $options = [] 
)
Parameters
array<string,mixed>‪$options

Definition at line 53 of file NoncePool.php.

References $name, TYPO3\CMS\Core\Security\NoncePool\$options, and TYPO3\CMS\Core\Security\NoncePool\isNonceUpToDate().

Member Function Documentation

◆ emit()

TYPO3\CMS\Core\Security\NoncePool::emit ( Nonce  $nonce)

◆ findSigningSecret()

TYPO3\CMS\Core\Security\NoncePool::findSigningSecret ( string  $name)

Finds a signing secret for a given name

Implements TYPO3\CMS\Core\Security\SigningProviderInterface.

Definition at line 78 of file NoncePool.php.

References $name.

◆ getSigningIdentifier()

array<string, getEmittableNonces(): array { return array_filter($this->changeItems); } public list<string> function getRevocableNames(): array { return array_keys( array_diff_key($this->changeItems, $this->getEmittableNonces()) ); } protected function isValidNonceName(Nonce $nonce, $name): bool { return $nonce-> TYPO3\CMS\Core\Security\NoncePool::getSigningIdentifier ( ) -> name===$name
Returns
‪array<string, Nonce>

◆ isNonceUpToDate()

TYPO3\CMS\Core\Security\NoncePool::isNonceUpToDate ( Nonce  $nonce)
protected

Definition at line 158 of file NoncePool.php.

Referenced by TYPO3\CMS\Core\Security\NoncePool\__construct().

◆ merge()

TYPO3\CMS\Core\Security\NoncePool::merge ( self  $other)

Definition at line 94 of file NoncePool.php.

◆ provideSigningSecret()

TYPO3\CMS\Core\Security\NoncePool::provideSigningSecret ( )

Provides a signing secret independently of any name or identifier. In case there is none, the corresponding provider has to create a new one.

Implements TYPO3\CMS\Core\Security\SigningProviderInterface.

Definition at line 83 of file NoncePool.php.

References TYPO3\CMS\Core\Security\NoncePool\$items, TYPO3\CMS\Core\Security\Nonce\create(), and TYPO3\CMS\Core\Security\NoncePool\emit().

◆ purge()

TYPO3\CMS\Core\Security\NoncePool::purge ( )

Definition at line 101 of file NoncePool.php.

References TYPO3\CMS\Core\Security\NoncePool\$items, and $name.

◆ revoke()

TYPO3\CMS\Core\Security\NoncePool::revoke ( Nonce  $nonce)

◆ revokeSigningSecret()

TYPO3\CMS\Core\Security\NoncePool::revokeSigningSecret ( string  $name)

Revokes a signing secret for a given name (providers without revocation functionality use an empty method body)

Implements TYPO3\CMS\Core\Security\SigningProviderInterface.

Definition at line 128 of file NoncePool.php.

References $name.

Referenced by TYPO3\CMS\Core\Security\NoncePool\revoke().

Member Data Documentation

◆ $changeItems

array TYPO3\CMS\Core\Security\NoncePool::$changeItems = []
protected

Definition at line 48 of file NoncePool.php.

◆ $items

array TYPO3\CMS\Core\Security\NoncePool::$items
protected

◆ $options

array TYPO3\CMS\Core\Security\NoncePool::$options
protected

Definition at line 38 of file NoncePool.php.

Referenced by TYPO3\CMS\Core\Security\NoncePool\__construct().

◆ DEFAULT_EXPIRATION

const TYPO3\CMS\Core\Security\NoncePool::DEFAULT_EXPIRATION = 900
protected

items will expire after this amount of seconds

Definition at line 33 of file NoncePool.php.

◆ DEFAULT_SIZE

const TYPO3\CMS\Core\Security\NoncePool::DEFAULT_SIZE = 5
protected

maximum amount of items in pool

Definition at line 28 of file NoncePool.php.