/** * Lista de escopos do usuario. * @return array */ public function getScopes() { if (is_null($this->scopes) != true) { return $this->scopes; } $me = $this->provider->getResourceOwner($this->getToken()); return $this->scopes = $me->scopes(); }
public function retrieveById($identifier) { $info = $this->provider->getResourceOwner($this->token); if ($info->getId() == $identifier) { $this->provider->setToken($this->token); $array = array_merge([], ['token' => $this->token], $info->toArray()); return new OAuthUser($this->provider, $array, $info->scopes()); } return null; }