예제 #1
0
 /**
  * Constructor for Google OAuth module
  * @param string $oAuthConsumerKey OAuth Consumer Key
  * @param string $oAuthConsumerSecret OAuth Consumer Secret
  * @param array $GoogleAPIScopes (optional) Array of Google API Scopes
  *		See full list here: http://code.google.com/apis/gdata/faq.html#AuthScopes
  */
 public function __construct($oAuthConsumerKey, $oAuthConsumerSecret, $GoogleAPIScopes = null)
 {
     // default scope needed for identity verification
     // TODO rewrite using hybrid OpenID + OAuth implementation
     $scopes = array('https://www.google.com/m8/feeds/');
     if (is_array($GoogleAPIScopes)) {
         $scopes = array_merge($scopes, $GoogleAPIScopes);
     }
     parent::__construct('Google', 'https://www.google.com/', $oAuthConsumerKey, $oAuthConsumerSecret, 'https://www.google.com/accounts/OAuthGetRequestToken', 'https://www.google.com/accounts/OAuthGetAccessToken', 'https://www.google.com/accounts/OAuthAuthorizeToken', array('HMAC-SHA1'), implode(' ', $scopes), UserConfig::$USERSROOTURL . '/modules/google_oauth/login-button.png', UserConfig::$USERSROOTURL . '/modules/google_oauth/login-button.png', UserConfig::$USERSROOTURL . '/modules/google_oauth/login-button.png', array(array(3001, "Logged in using Google account", 1), array(3002, "Added Google account", 1), array(3003, "Removed Google account", 0), array(3004, "Registered using Google account", 1)));
 }
예제 #2
0
 public function __construct($oAuthConsumerKey, $oAuthConsumerSecret)
 {
     parent::__construct('Twitter', 'http://api.twitter.com', $oAuthConsumerKey, $oAuthConsumerSecret, 'https://api.twitter.com/oauth/request_token', 'https://api.twitter.com/oauth/access_token', 'https://api.twitter.com/oauth/authenticate', array('HMAC-SHA1'), 'http://api.twitter.com', UserConfig::$USERSROOTURL . '/modules/twitter/login-button.png', UserConfig::$USERSROOTURL . '/modules/twitter/login-button.png', UserConfig::$USERSROOTURL . '/modules/twitter/login-button.png', array(array(4001, "Logged in using Twitter account", 1), array(4002, "Added Twitter account", 1), array(4003, "Removed Twitter account", 0), array(4004, "Registered using Twitter account", 1)));
 }
예제 #3
0
 public function __construct($oAuthConsumerKey, $oAuthConsumerSecret)
 {
     parent::__construct('Ohloh', 'http://www.ohloh.com', $oAuthConsumerKey, $oAuthConsumerSecret, 'http://www.ohloh.net/oauth/request_token', 'https://api.twitter.com/oauth/access_token', 'http://www.ohloh.net/oauth/access_token', array('HMAC-SHA1'), 'http://www.ohloh.com', null, null, null, array(array(5001, "Logged in using Ohloh account", 1), array(5002, "Added Ohloh account", 1), array(5003, "Removed Ohloh account", 0), array(5004, "Registered using Ohloh account", 1)));
 }
예제 #4
0
 public function __construct($oAuthConsumerKey, $oAuthConsumerSecret)
 {
     parent::__construct('Meetup', 'http://api.meetup.com', $oAuthConsumerKey, $oAuthConsumerSecret, 'https://api.meetup.com/oauth/request/', 'https://api.meetup.com/oauth/access/', 'http://www.meetup.com/authenticate/', array('HMAC-SHA1', 'PLAINTEXT'), 'http://api.meetup.com', UserConfig::$USERSROOTURL . '/modules/meetup/login-button.png', UserConfig::$USERSROOTURL . '/modules/meetup/login-button.png', UserConfig::$USERSROOTURL . '/modules/meetup/login-button.png', array(array(2001, "Logged in using Meetup account", 1), array(2002, "Added Meetup account", 1), array(2003, "Removed Meetup account", 0), array(2004, "Registered using Meetup account", 1)));
 }