A token store implemented using wp_options.
Located at culturehosts-helper/src/OAuth/WP_Option_Token_Store.php
| Methods |
public
|
__construct(string $option_name)
Creates a new token store
Creates a new token store
Parameters
| $option_name |
The key to use when storing/retrieving wp_options.
|
|
#
|
public
|
get_token(): string|null
Fetch the access token from the store.
Fetch the access token from the store.
Returns
Implements
|
#
|
public
|
get_token_expiry(): integer|null
Fetch the token expiry datetime.
Fetch the token expiry datetime.
Returns
The Unix timestamp at which the token expires
Implements
|
#
|
public
|
store_token(string $token, integer $expiry): boolean
Store a new token. Overwrites the existing one, if any.
Store a new token. Overwrites the existing one, if any.
Parameters
| $token |
The access token
|
| $expiry |
The Unix timestamp at which the token expires
|
Returns
Implements
|
#
|