Author: Hassan Khan (contact@hassankhan.me)
Example #1
0
 /**
  * Validates CSRF and returns the access token.
  *
  * @param string $code
  * @param string $grant
  *
  * @return AccessToken
  *
  * @see League\OAuth2\Client\Provider\AbstractProvider::getAccessToken()
  */
 public function getAccessToken($code, $grant = 'authorization_code')
 {
     $this->validateCsrf();
     return $this->provider->getAccessToken($grant, ['code' => $code]);
 }