Changeset 2086486
- Timestamp:
- 05/13/2019 04:47:25 AM (7 years ago)
- Location:
- narnoo-operator-connect/trunk
- Files:
-
- 11 edited
-
class-operator-connect-helper.php (modified) (1 diff)
-
libs/narnoo-php-sdk/Narnoo/Access/Access.php (modified) (1 diff)
-
libs/narnoo-php-sdk/Narnoo/Authenticate/Authenticate.php (modified) (2 diffs)
-
libs/narnoo-php-sdk/Narnoo/Booking/Booking.php (modified) (1 diff)
-
libs/narnoo-php-sdk/Narnoo/Business/Business.php (modified) (1 diff)
-
libs/narnoo-php-sdk/Narnoo/Connect/Connect.php (modified) (1 diff)
-
libs/narnoo-php-sdk/Narnoo/Media/Media.php (modified) (1 diff)
-
libs/narnoo-php-sdk/Narnoo/Product/Product.php (modified) (1 diff)
-
libs/narnooauthn.php (modified) (1 diff)
-
narnoo-operator-connect.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
narnoo-operator-connect/trunk/class-operator-connect-helper.php
r2022419 r2086486 52 52 $apiToken = get_option( 'narnoo_api_token' ); 53 53 } 54 /** 55 * 56 * Check to see if the current token is expired or not 57 * 58 **/ 59 $narnooToken = new NarnooToken(); 60 $tokenValid = $narnooToken->validCheck( $_apiToken ); 61 if(empty($tokenValid)){ 62 $apiToken = $narnooToken->authenticate($options['access_key'], $options['secret_key']); 63 if(!empty($apiToken)){ 64 update_option( 'narnoo_api_token', $apiToken, 'yes' ); 65 }else{ 66 return null; 67 } 68 } 69 //End 54 70 /** 55 71 * Create authentication Header to access the API. -
narnoo-operator-connect/trunk/libs/narnoo-php-sdk/Narnoo/Access/Access.php
r1928365 r2086486 1 <? 1 <?php 2 2 3 3 namespace Narnoo\Access; -
narnoo-operator-connect/trunk/libs/narnoo-php-sdk/Narnoo/Authenticate/Authenticate.php
r1928365 r2086486 1 <? 1 <?php 2 2 3 3 namespace Narnoo\Authenticate; … … 44 44 * 45 45 **************************************************/ 46 /************************************************** 47 * 48 * --- Valid Check --- 49 * 50 **************************************************/ 51 52 /** 53 * @title: Get Products 54 * @date: 25.06.2018 55 * @param: int business ID [optional] 56 * @result: JSON 57 */ 58 public function valid() 59 { 60 61 try{ 62 $url = "/token/validate"; 63 $response = $this->callNarnooAPI("get",$url); 64 return $response; 65 } catch (Exception $e) { 66 $response = array("error" => $e->getMessage()); 67 return $response; 68 } 69 } 46 70 71 72 /************************************************** 73 * 74 * --- .Valid Check --- 75 * 76 **************************************************/ 47 77 48 78 -
narnoo-operator-connect/trunk/libs/narnoo-php-sdk/Narnoo/Booking/Booking.php
r1928365 r2086486 1 <? 1 <?php 2 2 3 3 namespace Narnoo\Booking; -
narnoo-operator-connect/trunk/libs/narnoo-php-sdk/Narnoo/Business/Business.php
r1928365 r2086486 1 <? 1 <?php 2 2 3 3 namespace Narnoo\Business; -
narnoo-operator-connect/trunk/libs/narnoo-php-sdk/Narnoo/Connect/Connect.php
r1928365 r2086486 1 <? 1 <?php 2 2 3 3 namespace Narnoo\Connect; -
narnoo-operator-connect/trunk/libs/narnoo-php-sdk/Narnoo/Media/Media.php
r1928365 r2086486 1 <? 1 <?php 2 2 3 3 namespace Narnoo\Media; -
narnoo-operator-connect/trunk/libs/narnoo-php-sdk/Narnoo/Product/Product.php
r1928365 r2086486 1 <? 1 <?php 2 2 3 3 namespace Narnoo\Product; -
narnoo-operator-connect/trunk/libs/narnooauthn.php
r1928365 r2086486 19 19 } 20 20 21 public function validCheck($token){ 22 23 $authn = new Authenticate(); 24 $authn->setToken($token); 25 $token = $authn->valid(); 26 if( !empty($token->data) ){ 27 return TRUE; 28 }else{ 29 return FALSE; 30 } 31 } 32 21 33 22 34 } -
narnoo-operator-connect/trunk/narnoo-operator-connect.php
r2022419 r2086486 4 4 Plugin URI: http://narnoo.com/ 5 5 Description: Allows Wordpress users to connect with other Narnoo products and import their listings into their website. 6 Version: 1.2. 06 Version: 1.2.2 7 7 Author: Narnoo Wordpress developer 8 8 Author URI: http://www.narnoo.com/ … … 27 27 // plugin definitions 28 28 define( 'NARNOO_OPERATOR_CONNECT_PLUGIN_NAME', 'Narnoo Operator Connect' ); 29 define( 'NARNOO_OPERATOR_CONNECT_CURRENT_VERSION', '1.2. 0' );29 define( 'NARNOO_OPERATOR_CONNECT_CURRENT_VERSION', '1.2.2' ); 30 30 define( 'NARNOO_OPERATOR_CONNECT_I18N_DOMAIN', 'narnoo-operator-connect' ); 31 31 -
narnoo-operator-connect/trunk/readme.txt
r2022419 r2086486 4 4 Tags: Tourism, Media, Web Service, Travel, Narnoo, Suppliers, Connected 5 5 Requires at least: 3.3 6 Tested up to: 5. 0.37 Stable tag: 1.2. 06 Tested up to: 5.2.0 7 Stable tag: 1.2.2 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 36 36 == Changelog == 37 37 38 13-05-2019: Added token validation 38 39 31-01-2019: Moved menu items 39 40 2018: Version One.
Note: See TracChangeset
for help on using the changeset viewer.