NoncePool implements SigningProviderInterface

Internal

Table of Contents

Interfaces

SigningProviderInterface

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

$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> = []

findSigningSecret()

Finds a signing secret for a given name

public findSigningSecret(string $name) : Nonce|null
Parameters
$name : string
Return values
Nonce|null

getEmittableNonces()

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
self

provideSigningSecret()

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
Nonce

purge()

public purge() : self
Return values
self

revokeSigningSecret()

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
bool

isValidNonceName()

protected isValidNonceName(Nonce $nonce, mixed $name) : bool
Parameters
$nonce : Nonce
$name : mixed
Return values
bool

        
On this page

Search results