RestApi Scope

The authorization and token endpoints allow the client to specify the scope of the access request using the "scope" request parameter. In turn, the authorization server uses the "scope" response parameter to inform the client of the scope of the access token issued.

The value of the scope parameter is expressed as a list of space-delimited, case-sensitive strings. The strings are defined by the authorization server. If the value contains multiple space-delimited strings, their order does not matter, and each string adds an additional access range to the requested scope.

$scope = new Scope();

Please see Access Token Scope for more information.


getValue

Retrieve a space-delimited string of the values.

$value = $scope->getValue();

getValues

Retrieve all the values.

$values = $scope->getValues();

hasValue

Checks if the given case-sensitive value is exists.

$has_value = $scope->hasValue($value);

withValue

Return an instance with the provided value.

$scope = $scope->withValue($value);

withAddedValue

Return an instance with the appended given value.

$scope = $scope->withAddedValue($value);

withoutValue

Return an instance without the specified value.

$scope = $scope->withoutValue($value);