NoncePool implements SigningProviderInterface
Table of Contents
Interfaces
Constants
- DEFAULT_EXPIRATION = 900
- items will expire after this amount of seconds
- DEFAULT_SIZE = 5
- maximum amount of items in pool
Properties
- $changeItems : array<string, Nonce|null>
- $items : array<string, Nonce>
- $options : array{size: positive-int, expiration: int}
Methods
- __construct() : mixed
- emit() : self
- findSigningSecret() : Nonce|null
- Finds a signing secret for a given name
- getEmittableNonces() : array<string, Nonce>
- getRevocableNames() : array<int, string>
- merge() : self
- provideSigningSecret() : Nonce
- Provides a signing secret independently of any name or identifier.
- purge() : self
- revoke() : self
- revokeSigningSecret() : void
- Revokes a signing secret for a given name (providers without revocation functionality use an empty method body)
- isNonceUpToDate() : bool
- isValidNonceName() : bool
Constants
DEFAULT_EXPIRATION
items will expire after this amount of seconds
protected
mixed
DEFAULT_EXPIRATION
= 900
DEFAULT_SIZE
maximum amount of items in pool
protected
mixed
DEFAULT_SIZE
= 5
Properties
$changeItems
protected
array<string, Nonce|null>
$changeItems
= []
$items
protected
array<string, Nonce>
$items
$options
protected
array{size: positive-int, expiration: int}
$options
Methods
__construct()
public
__construct([array<string|int, mixed> $nonces = [] ][, array<string, mixed> $options = [] ]) : mixed
Parameters
- $nonces : array<string|int, mixed> = []
- $options : array<string, mixed> = []
emit()
public
emit(Nonce $nonce) : self
Parameters
- $nonce : Nonce
Return values
selffindSigningSecret()
Finds a signing secret for a given name
public
findSigningSecret(string $name) : Nonce|null
Parameters
- $name : string
Return values
Nonce|nullgetEmittableNonces()
public
getEmittableNonces() : array<string, Nonce>
Return values
array<string, Nonce>getRevocableNames()
public
getRevocableNames() : array<int, string>
Return values
array<int, string>merge()
public
merge(self $other) : self
Parameters
- $other : self
Return values
selfprovideSigningSecret()
Provides a signing secret independently of any name or identifier.
public
provideSigningSecret() : Nonce
In case there is none, the corresponding provider has to create a new one.
Return values
Noncepurge()
public
purge() : self
Return values
selfrevoke()
public
revoke(Nonce $nonce) : self
Parameters
- $nonce : Nonce
Return values
selfrevokeSigningSecret()
Revokes a signing secret for a given name (providers without revocation functionality use an empty method body)
public
revokeSigningSecret(string $name) : void
Parameters
- $name : string
isNonceUpToDate()
protected
isNonceUpToDate(Nonce $nonce) : bool
Parameters
- $nonce : Nonce
Return values
boolisValidNonceName()
protected
isValidNonceName(Nonce $nonce, mixed $name) : bool
Parameters
- $nonce : Nonce
- $name : mixed