Overtrue\Socialite\AccessTokenInterface::getToken PHP Method

getToken() public method

Return the access token string.
public getToken ( ) : string
return string
    public function getToken();

Usage Example

Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 protected function getUserByToken(AccessTokenInterface $token)
 {
     $userUrl = 'https://api.github.com/user?access_token=' . $token->getToken();
     $response = $this->getHttpClient()->get($userUrl, $this->getRequestOptions());
     $user = json_decode($response->getBody(), true);
     if (in_array('user:email', $this->scopes)) {
         $user['email'] = $this->getEmailByToken($token);
     }
     return $user;
 }
All Usage Examples Of Overtrue\Socialite\AccessTokenInterface::getToken
AccessTokenInterface