Пример #1
0
 /**
  * Returns oauth 2 client side class
  * 
  * @param string The application client ID, can get through registration
  * @param string The application secret, can get through registration 
  * @param url Your callback url or where do you want to redirect the user after authentication
  * @param url The request url,  can get through registration
  * @param url The access url,  can get through registration
  * @return Eden_Oauth2_Client
  */
 public function client($client, $secret, $redirect, $requestUrl, $accessUrl)
 {
     //argument test
     Eden_Oauth2_Error::i()->argument(1, 'string')->argument(2, 'string')->argument(3, 'url')->argument(4, 'url')->argument(5, 'url');
     //argument 5 must be a url
     return Eden_Oauth2_Client::i($client, $secret, $redirect, $requestUrl, $accessUrl);
 }
Пример #2
0
if(!class_exists('Eden_Oauth2')){class Eden_Oauth2 extends Eden_Class{public static function i(){return self::_getSingleton(__CLASS__);}public function client($client,$secret,$redirect,$requestUrl,$accessUrl){Eden_Oauth2_Error::i()->argument(1,'string')->argument(2,'string')->argument(3,'url')->argument(4,'url')->argument(5,'url');return Eden_Oauth2_Client::i($client,$secret,$redirect,$requestUrl,$accessUrl);}public function desktop($client,$secret,$redirect,$requestUrl,$accessUrl){Eden_Oauth2_Error::i()->argument(1,'string')->argument(2,'string')->argument(3,'url')->argument(4,'url')->argument(5,'url');return Eden_Oauth2_Desktop::i($client,$secret,$redirect,$requestUrl,$accessUrl);}}}