getResourceOwnerType() public static method

Get the resource owner type of the current request (client or user).
public static getResourceOwnerType ( ) : string
return string
Esempio n. 1
0
 public function toArray()
 {
     $array = parent::toArray();
     $access_token = Input::get('access_token');
     if ($access_token) {
         \Authorizer::getChecker()->isValidRequest(true, $access_token);
     }
     $user_type = \Authorizer::getChecker()->getAccessToken() ? \Authorizer::getResourceOwnerType() : false;
     if ($user_type == 'user') {
         $array['logs'] = $this->logs();
     }
     return $array;
 }