getAccessToken() public method

array( 'access_token' => '', 'access_token_secret' => '', 'refresh_token' => '', 'expires_in' => '', 'expires_at' => '', )
public getAccessToken ( ) : array
return array
Example #1
0
 /**
  * @param \Hybrid_User_Profile $data
  * @param  \Application\Users\Row $user
  * @return void
  */
 public function registration($data, $user)
 {
     $row = new Auth\Row();
     $row->userId = $user->id;
     $row->provider = strtolower($this->providerName);
     $row->foreignKey = $data->identifier;
     $row->token = $this->authAdapter->getAccessToken()['access_token'];
     $row->tokenSecret = $this->authAdapter->getAccessToken()['access_token_secret'] ?: '';
     $row->tokenType = Auth\Table::TYPE_ACCESS;
     $row->save();
     Messages::addNotice(sprintf('Your account was linked to %s successfully !', $this->providerName));
     $this->response->redirectTo('users', 'profile', ['id' => $user->id]);
 }