Unique token generator/validator.
More...
|
| hash ($context, $token) |
|
| init () |
|
| done () |
|
| getSession () |
|
| publish ($property, $visibility=self::READABLE) |
| Publish a property (or hide it again). More...
|
|
| configure ($config) |
| Configure the object. More...
|
|
| _get ($key) |
| Default getter if no specific setter is defined, and the property is also not published (readable). More...
|
|
| _set ($key, $value) |
| Default setter if no specific setter is defined, and the property is also not published (writeable). More...
|
|
Unique token generator/validator.
Definition at line 8 of file Token.php.
◆ delete()
Delete a token.
- Returns
- bool True on success.
Definition at line 53 of file Token.php.
◆ generate()
generate |
( |
|
$context = null , |
|
|
|
$ttl = null |
|
) |
| |
Generate a token.
- Parameters
-
mixed | $context | Context for the token. |
int | $ttl | Time-to-live in seconds (empty = indefinitely). |
- Returns
- string Random token for this context.
Definition at line 21 of file Token.php.
◆ hash()
hash |
( |
|
$context, |
|
|
|
$token |
|
) |
| |
|
protected |
◆ valid()
valid |
( |
|
$token, |
|
|
|
$context = null |
|
) |
| |
Check if a token is (still) valid.
- Parameters
-
string | $token | Token to check. |
mixed | $context | Context for the token. |
- Returns
- bool True if the token is valid.
Definition at line 32 of file Token.php.
◆ $length
The documentation for this class was generated from the following file:
- /var/www/fred.local/vendor/rsi/fred/src/Rsi/Fred/Token.php