/** * Constructor. * * @param Grav $grav Grav instance * @param string $action The name of the action * @param array $post An array of values passed to the action */ public function __construct(Grav $grav, $action, $post = null) { parent::__construct($grav, ucfirst($action), $post); // Session storage $this->storage = new Session(false, 'oauth_token', 'oauth_state'); /** @var $serviceFactory \OAuth\ServiceFactory */ $this->factory = new ServiceFactory(); // Use curl client instead of fopen stream if (extension_loaded('curl')) { $this->factory->setHttpClient(new CurlCLient()); } }