public function __construct() { parent::__construct(); // Set our settings $this->setApplicationName("WordPress SEO Premium"); // Not sure if used $this->setClientId('887668307827-4jhsr06rntrt3g3ss2r72dblf3ca7msv.apps.googleusercontent.com'); $this->setClientSecret('pPW5gLoTNtNHyiDH6YRn-CIB'); $this->setRedirectUri('urn:ietf:wg:oauth:2.0:oob'); $this->setScopes(array('https://www.google.com/webmasters/tools/feeds/')); // Let's get an access token if we've got a refresh token $refresh_token = $this->get_refresh_token(); if ('' != $refresh_token) { // Refresh the token $response = $this->refreshToken($refresh_token); // Check response if ('' != $response) { $response = json_decode($response); // Check if there is an access_token if (isset($response->access_token)) { // Set access_token $this->setAccessToken($response->access_token); } } } }
public function __construct() { parent::__construct(); // Set our settings $this->setApplicationName('WordPress SEO by Yoast Premium'); // Not sure if used $this->setClientId('972827778625-rvd2mfvj3fnc97es9p57vqaap2lucm3h.apps.googleusercontent.com'); $this->setClientSecret('i32Z2SFYPdxNRALHf25uwMFW'); $this->setRedirectUri('urn:ietf:wg:oauth:2.0:oob'); $this->setScopes(array('https://www.google.com/webmasters/tools/feeds/')); // Let's get an access token if we've got a refresh token $refresh_token = $this->get_refresh_token(); if ('' != $refresh_token) { try { // Refresh the token $response = $this->refreshToken($refresh_token); // Check response if ('' != $response) { $response = json_decode($response); // Check if there is an access_token if (isset($response->access_token)) { // Set access_token $this->setAccessToken($response->access_token); } } } catch (Exception $e) { delete_option('wpseo-premium-gwt'); $this->save_refresh_token(''); } } }
public function __construct($config = null) { parent::__construct($config); $this->_key = Config::get('ssoGoogleKey'); $this->_secret = Config::get('ssoGoogleSecret'); $this->setClientId($this->_key); $this->setClientSecret($this->_secret); }
public function __construct($config = null) { parent::__construct($config); $this->_key = config('services.google.key'); $this->_secret = config('services.google.secret'); $this->setClientId($this->_key); $this->setClientSecret($this->_secret); }
public function __construct($config = array()) { parent::__construct($config); if (empty(\GO::config()->googledrive_oauth2_client_id) || empty(\GO::config()->googledrive_oauth2_client_secret) || empty(\GO::config()->googledrive_simple_api_key)) { throw new \Exception("Google drive API client not setup. \$config['googledrive_oauth2_client_id'], \$config['googledrive_oauth2_client_secret'] and \$config['googledrive_simple_api_key'] must be set."); } $this->setApplicationName(\GO::config()->title); $this->setUseObjects(true); $this->setClientId(\GO::config()->googledrive_oauth2_client_id); $this->setClientSecret(\GO::config()->googledrive_oauth2_client_secret); // $this->setDeveloperKey(\GO::config()->googledrive_simple_api_key); }
/** * Constructor for the class. We call the parent constructor, set * scopes array and service calendar instance that we will use */ function __construct() { parent::__construct(); /** * Google calendar service may have the options: * Google_Service_Calendar::CALENDAR_READONLY * if you want read only access * or * Google_Service_Calendar::CALENDAR * if you want read/write access to the calendar */ $this->_scopes = implode(' ', array(\Google_Service_Calendar::CALENDAR)); $this->_google_service_calendar = new \Google_Service_Calendar($this); }
/** * Class constructor * * @param \Illuminate\Session\SessionManager $session * @return void */ public function __construct() { parent::__construct(); $this->setApplicationName(Config::get('services.google_oauth.app_name')); $this->setAccessType(Config::get('services.google_oauth.access_type')); $this->setClientId(Config::get('services.google_oauth.client_id')); $this->setClientSecret(Config::get('services.google_oauth.client_secret')); // http://stackoverflow.com/questions/21020898/403-error-with-messageaccess-not-configured-please-use-google-developers-conso // $this->setDeveloperKey(Config::get('google::api.api_key')); $this->setScopes(Config::get('services.google_oauth.scope')); $url = url(Config::get('services.google_oauth.redirect')); $this->setRedirectUri($url); if ($access_token = Session::get('google.access_token')) { $this->setAccessToken($access_token); } }
/** * Constructor. * * @param array $config */ public function __construct(array $config) { // $gc = new \Google_Config(); // $gc->setApplicationName($config['application_name']); // $gc->setClientId($config['client_id']); // $gc->setClientSecret($config['client_secret']); // $gc->setRedirectUri($config['redirect_uri']); // $gc->setDeveloperKey($config['developer_key']); // parent::__construct($gc); // $gc = new \Google_Config(); // $gc->setApplicationName('delta-compass-88413'); // $gc->setClientId('325619265545-s52p0vqjttcmcbp4p5s70q2mbi2si9dt.apps.googleusercontent.com'); // $gc->setClientSecret('F6P1m7Hj4q821Gu_hfQzjV-n'); // $gc->setRedirectUri($config['redirect_uri']); // $gc->setDeveloperKey($config['developer_key']); // parent::__construct($gc); parent::__construct(); }
function __construct($params = array()) { parent::__construct(); }
public function __construct() { parent::__construct(); }