You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The pattern definition for scope in the client requires a space after each scope. This is causing problems when generating a client that checks against this pattern.
I've generated a PHP client and so far it works, but when creating a client I get errors when the scope is returned.
For reference, the generated code:
/**
* Sets scope
* @param string $scope Scope is a string containing a space-separated list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) that the client can use when requesting access tokens.
* @return $this
*/
public function setScope($scope)
{
if (!is_null($scope) && (!preg_match("/([a-zA-Z0-9\\.\\*]+\\s)+/", $scope))) {
throw new \InvalidArgumentException("invalid value for $scope when calling OAuth2Client., must conform to the pattern /([a-zA-Z0-9\\.\\*]+\\s)+/.");
}
$this->container['scope'] = $scope;
return $this;
}
Changing it to /([a-zA-Z0-9\\.\\*]+\\s?)+/ resolves the issue.
Am I reading this correctly? Want a PR?
The text was updated successfully, but these errors were encountered:
The pattern definition for scope in the client requires a space after each scope. This is causing problems when generating a client that checks against this pattern.
https://github.com/ory/hydra/blob/master/client/client.go#L57
I've generated a PHP client and so far it works, but when creating a client I get errors when the scope is returned.
For reference, the generated code:
Changing it to
/([a-zA-Z0-9\\.\\*]+\\s?)+/
resolves the issue.Am I reading this correctly? Want a PR?
The text was updated successfully, but these errors were encountered: