示例#1
0
 /**
  * Gets the currently-authenticated User
  *
  * @param $opts array
  *
  * @return User
  */
 public function getAuthorizedUser(array $opts = [])
 {
     return $this->cache->get("authorized_user", function () use($opts) {
         $base = $this->userResourceUrl . "/me";
         $url = $base . $this->buildQuery($this->getDefaultUserOpts() + $opts);
         return User::wrap($this->authGet($url));
     });
 }
 protected function transform(stdClass $object)
 {
     return User::wrap($object);
 }