mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-26 15:00:19 +05:30
Scope delimiter string is now a constant
This commit is contained in:
parent
f74bca33ab
commit
e6cc6c35ec
@ -29,6 +29,8 @@ use Psr\Http\Message\ServerRequestInterface;
|
|||||||
*/
|
*/
|
||||||
abstract class AbstractGrant implements GrantTypeInterface
|
abstract class AbstractGrant implements GrantTypeInterface
|
||||||
{
|
{
|
||||||
|
const SCOPE_DELIMITER_STRING = ' ';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Grant identifier
|
* Grant identifier
|
||||||
*
|
*
|
||||||
@ -181,7 +183,6 @@ abstract class AbstractGrant implements GrantTypeInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $scopeParamValue A string containing a delimited set of scope identifiers
|
* @param string $scopeParamValue A string containing a delimited set of scope identifiers
|
||||||
* @param string $scopeDelimiterString The delimiter between the scopes in the value string
|
|
||||||
* @param ClientEntityInterface $client
|
* @param ClientEntityInterface $client
|
||||||
* @param string $redirectUri
|
* @param string $redirectUri
|
||||||
*
|
*
|
||||||
@ -190,12 +191,11 @@ abstract class AbstractGrant implements GrantTypeInterface
|
|||||||
*/
|
*/
|
||||||
public function validateScopes(
|
public function validateScopes(
|
||||||
$scopeParamValue,
|
$scopeParamValue,
|
||||||
$scopeDelimiterString,
|
|
||||||
ClientEntityInterface $client,
|
ClientEntityInterface $client,
|
||||||
$redirectUri = null
|
$redirectUri = null
|
||||||
) {
|
) {
|
||||||
$scopesList = array_filter(
|
$scopesList = array_filter(
|
||||||
explode($scopeDelimiterString, trim($scopeParamValue)),
|
explode(self::SCOPE_DELIMITER_STRING, trim($scopeParamValue)),
|
||||||
function ($scope) {
|
function ($scope) {
|
||||||
return !empty($scope);
|
return !empty($scope);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user