Refix scope

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
pull/9481/head
Roeland Jago Douma 7 years ago
parent 991d9b5c3a
commit 4ea2daf04d
No known key found for this signature in database
GPG Key ID: F941078878347C0C
  1. 6
      lib/private/Authentication/Token/DefaultToken.php
  2. 2
      lib/private/Authentication/Token/IToken.php

@ -158,9 +158,11 @@ class DefaultToken extends Entity implements IToken {
return $scope;
}
public function setScope(array $scope = null) {
if ($scope !== null) {
public function setScope($scope) {
if (\is_array($scope)) {
parent::setScope(json_encode($scope));
} else {
parent::setScope((string)$scope);
}
}

@ -94,7 +94,7 @@ interface IToken extends JsonSerializable {
*
* @param array $scope
*/
public function setScope(array $scope = null);
public function setScope($scope);
public function getName(): string;

Loading…
Cancel
Save