49 public function get($clientId, $scope, $additionalParams, $userId)
53 $additionalParams = $this->
getTokenParams($additionalParams, $userId);
56 $authResult = $client->getAuth($clientId, $scope, $additionalParams);
58 if($authResult[
'result'])
60 if($authResult[
'result'][
'access_token'])
62 $authResult[
'result'][
'user_id'] = $userId;
63 $authResult[
'result'][
'client_id'] = $clientId;
68 if (!empty($authResult[
'result'][
'date_finish_format']))
70 $dateFinish =
new DateTime($authResult[
'result'][
'date_finish_format'], DATE_ATOM);
71 $authResult[
'result'][
'date_finish'] = $dateFinish->getTimestamp();
74 return $authResult[
'result'];