public function getAccessToken($code, $grant = 'authorization_code')
    {
        $this->validateCsrf();
        return $this->provider->getAccessToken($grant, ['code' => $code]);
    }
public function getAccessToken($code, $grant = 'authorization_code')
    {
        $this->validateCsrf();
        return $this->provider->getAccessToken($grant, ['code' => $code]);
    }
public function getAccessToken ( $ code , $ grant = 'authorization_code' ) { $ this -> validateCsrf ( ) ; return $ this -> provider -> getAccessToken ( $ grant , [ 'code' => $ code ] ) ; }
Validates CSRF and returns the access token.

@param string $code
@param string $grant

@return AccessToken

@see League\OAuth2\Client\Provider\AbstractProvider::getAccessToken()
Validates CSRF and returns the access token .