getScopes() public method

Get the route scopes.
public getScopes ( ) : array
return array
Example #1
0
 /**
  * @param Route $route
  * @param array $scopes
  * @return bool
  */
 private function handleScope(Route $route, $scopes = [])
 {
     if (!empty($scopes)) {
         if ($this->token->hasScope($scopes, $route->getService())) {
             return true;
         }
         $this->unauthorized('Invalid Scope', 'Permission Denied! Service [ ' . $route->getService() . ' ] requires scopes [' . implode(',', $route->getScopes()) . '] to access this resource.');
     }
     return true;
 }