use OAuth2Framework\Component\Server\Model\DataBag\DataBag;
18
use OAuth2Framework\Component\Server\Model\UserAccount\UserAccountId;
19
20
final class ScopePolicyDefaultRule implements RuleInterface
21
{
22
/**
23
* {@inheritdoc}
24
*/
25
public function handle(DataBag $commandParameters, DataBag $validatedParameters, ?UserAccountId $userAccountId, callable $next): DataBag
26
{
27
if ($commandParameters->has('default_scope')) {
28
Assertion::regex($commandParameters->get('default_scope'), '/^[\x20\x23-\x5B\x5D-\x7E]+$/', 'Invalid characters found in the \'default_scope\' parameter.');