ILIAS
release_8 Revision v8.19-1-g4e8f2f9140c
|
Class to represent an HTTP message. More...
Public Member Functions | |
__construct (Platform $platform, array $scopes=null, string $token=null, int $expires=null) | |
Class constructor. More... | |
getPlatform () | |
Get platform. More... | |
load () | |
Load a nonce value from the database. More... | |
save () | |
Save a nonce value in the database. More... | |
hasScope (string $scope='') | |
Check if a valid access token exists for a specific scope (or any scope if none specified). More... | |
get (string $scope='', bool $scopeOnly=false) | |
Obtain a valid access token for a scope. More... | |
Data Fields | |
string | $token = null |
Access token string. More... | |
int | $expires = null |
Timestamp at which the token string expires. More... | |
array | $scopes = array() |
Scope(s) for which the access token is valid. More... | |
int | $created = null |
Timestamp for when the object was created. More... | |
int | $updated = null |
Timestamp for when the object was last updated. More... | |
Private Attributes | |
Platform | $platform = null |
Platform for this context. More... | |
Class to represent an HTTP message.
Definition at line 32 of file AccessToken.php.
ILIAS\LTI\ToolProvider\AccessToken::__construct | ( | Platform | $platform, |
array | $scopes = null , |
||
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 //UK: changed datetime to int |
Definition at line 83 of file AccessToken.php.
References ILIAS\LTI\ToolProvider\AccessToken\$expires, ILIAS\LTI\ToolProvider\AccessToken\$platform, ILIAS\LTI\ToolProvider\AccessToken\$scopes, ILIAS\LTI\ToolProvider\AccessToken\$token, and ILIAS\LTI\ToolProvider\AccessToken\load().
ILIAS\LTI\ToolProvider\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 |
Definition at line 153 of file AccessToken.php.
References ILIAS\LTI\ToolProvider\Tool\$defaultTool, $http, ILIAS\LTI\ToolProvider\AccessToken\$platform, $scope, $type, $url, and ILIAS\LTI\ToolProvider\AccessToken\save().
ILIAS\LTI\ToolProvider\AccessToken::getPlatform | ( | ) |
Get platform.
Definition at line 105 of file AccessToken.php.
References ILIAS\LTI\ToolProvider\AccessToken\$platform.
ILIAS\LTI\ToolProvider\AccessToken::hasScope | ( | string | $scope = '' | ) |
Check if a valid access token exists for a specific scope (or any scope if none specified).
string | $scope | Access scope |
Definition at line 136 of file AccessToken.php.
References $scope.
ILIAS\LTI\ToolProvider\AccessToken::load | ( | ) |
Load a nonce value from the database.
Definition at line 115 of file AccessToken.php.
Referenced by ILIAS\LTI\ToolProvider\AccessToken\__construct().
ILIAS\LTI\ToolProvider\AccessToken::save | ( | ) |
Save a nonce value in the database.
Definition at line 125 of file AccessToken.php.
Referenced by ILIAS\LTI\ToolProvider\AccessToken\get().
int null ILIAS\LTI\ToolProvider\AccessToken::$created = null |
Timestamp for when the object was created.
Definition at line 67 of file AccessToken.php.
int null ILIAS\LTI\ToolProvider\AccessToken::$expires = null |
Timestamp at which the token string expires.
Definition at line 46 of file AccessToken.php.
Referenced by ILIAS\LTI\ToolProvider\AccessToken\__construct().
|
private |
Platform for this context.
Definition at line 60 of file AccessToken.php.
Referenced by ILIAS\LTI\ToolProvider\AccessToken\__construct(), ILIAS\LTI\ToolProvider\AccessToken\get(), and ILIAS\LTI\ToolProvider\AccessToken\getPlatform().
array ILIAS\LTI\ToolProvider\AccessToken::$scopes = array() |
Scope(s) for which the access token is valid.
Definition at line 53 of file AccessToken.php.
Referenced by ILIAS\LTI\ToolProvider\AccessToken\__construct().
string null ILIAS\LTI\ToolProvider\AccessToken::$token = null |
Access token string.
Definition at line 39 of file AccessToken.php.
Referenced by ILIAS\LTI\ToolProvider\AccessToken\__construct().
int null ILIAS\LTI\ToolProvider\AccessToken::$updated = null |
Timestamp for when the object was last updated.
Definition at line 74 of file AccessToken.php.