Class to represent an HTTP message. More...
Public Member Functions | |
| __construct (Platform $platform, ?array $scopes=[], ?string $token=null, ?int $expires=null) | |
| Class constructor. | |
| Platform | getPlatform () |
| Get platform. | |
| bool | load () |
| Load a nonce value from the database. | |
| bool | save () |
| Save a nonce value in the database. | |
| bool | hasScope (string $scope="") |
| Check if a valid access token exists for a specific scope (or any scope if none specified). | |
| AccessToken | get (string $scope="", bool $scopeOnly=false) |
| Obtain a valid access token for a scope. | |
Class to represent an HTTP message.
| __construct | ( | Platform | $platform, |
| ?array | $scopes = [], | ||
| ?string | $token = null, | ||
| ?int | $expires = null ) |
Class constructor.
| Platform | $platform | Platform |
| array | null | $scopes | Scopes for which the access token is valid |
| string | null | $token | Access token string |
| int | null | $expires | Time in seconds after which the token string will expire |
| AccessToken get | ( | string | $scope = "", |
| bool | $scopeOnly = false ) |
Obtain a valid access token for a scope.
| string | $scope | Access scope |
| bool | $scopeOnly | If true, a token is requested just for the specified scope |
References Util\jsonDecode(), and save().
Referenced by DataConnector\savePlatformNonce().
| Platform getPlatform | ( | ) |
Get platform.
Referenced by DataConnector\savePlatformNonce(), DataConnector_mysqli\savePlatformNonce(), DataConnector_pgsql\savePlatformNonce(), and DataConnector_sql\savePlatformNonce().
| bool hasScope | ( | string | $scope = "" | ) |
Check if a valid access token exists for a specific scope (or any scope if none specified).
| string | $scope | Access scope |
| bool load | ( | ) |
Load a nonce value from the database.
References Util\logError().
| bool save | ( | ) |
Save a nonce value in the database.
Referenced by get().