class SecretToken implements HeaderProcessor

Representation for secret token

Constants

HEADER_NAME

Header name that contains our secret token

Methods

__construct($token)

SecretToken constructor.

bool
isHeaderPresent()

No description

string
getHeaderValue()

No description

bool|void
verify(bool $failSilent = false)

Verify token

Details

at line 31
__construct($token)

SecretToken constructor.

Parameters

$token string Secret token

at line 39
bool isHeaderPresent()

Return Value

bool Header is present (true) or not (false)

at line 47
string getHeaderValue()

Return Value

string Get value sent with header

at line 60
bool|void verify(bool $failSilent = false)

Verify token

Parameters

bool $failSilent Verify via boolean (true) or via exception (false)

Return Value

bool|void Based on failSilent method returns void or an boolean of the result

Exceptions

SecretTokenInvalidException
SecretTokenMissingException Token header not set