- See also
- OAuth2\ScopeInterface
Definition at line 11 of file Scope.php.
◆ __construct()
OAuth2\Scope::__construct |
( |
|
$storage = null | ) |
|
- Parameters
-
mixed | @storage Either an array of supported scopes, or an instance of OAuth2\Storage\ScopeInterface |
Definition at line 19 of file Scope.php.
◆ checkScope()
OAuth2\Scope::checkScope |
( |
|
$required_scope, |
|
|
|
$available_scope |
|
) |
| |
◆ getDefaultScope()
OAuth2\Scope::getDefaultScope |
( |
|
$client_id = null | ) |
|
The default scope to use in the event the client does not request one. By returning "false", a request_error is returned by the server to force a scope request by the client. By returning "null", opt out of requiring scopes
- Parameters
-
$client_id | An optional client id that can be used to return customized default scopes. |
- Returns
- string representation of default scope, null if scopes are not defined, or false to force scope request by the client
ex: 'default' ex: null
Implements OAuth2\Storage\ScopeInterface.
Definition at line 85 of file Scope.php.
◆ getReservedScopes()
OAuth2\Scope::getReservedScopes |
( |
| ) |
|
Get reserved scopes needed by the server.
In case OpenID Connect is used, these scopes must include: 'openid', offline_access'.
- Returns
- An array of reserved scopes.
Definition at line 99 of file Scope.php.
◆ getScopeFromRequest()
◆ scopeExists()
OAuth2\Scope::scopeExists |
( |
|
$scope | ) |
|
Check if the provided scope exists in storage.
- Parameters
-
$scope | A space-separated string of scopes. |
- Returns
- TRUE if it exists, FALSE otherwise.
Implements OAuth2\Storage\ScopeInterface.
Definition at line 63 of file Scope.php.
◆ $storage
The documentation for this class was generated from the following file: