Changeset 3205463
- Timestamp:
- 12/10/2024 09:44:24 AM (16 months ago)
- Location:
- ce21-suite
- Files:
-
- 4 edited
-
tags/2.2.1/programs/ce21-programs-functions.php (modified) (1 diff)
-
tags/2.2.1/single-sign-on-ce21.php (modified) (1 diff)
-
trunk/programs/ce21-programs-functions.php (modified) (1 diff)
-
trunk/single-sign-on-ce21.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ce21-suite/tags/2.2.1/programs/ce21-programs-functions.php
r3203632 r3205463 125 125 126 126 // Enqueue DataTables CSS and JS 127 wp_enqueue_style('datatables-bootstrap5-2-css', plugins_url('admin/datatable-bootstrap/bootstrap-5.2.min.css', __FILE__));128 wp_enqueue_style('datatables-bootstrap5-css', plugins_url('admin/datatable-bootstrap/dataTables.bootstrap5.min.css', __FILE__));127 wp_enqueue_style('datatables-bootstrap5-2-css', SINGLE_SIGN_ON_CE21__PLUGIN_URL .'admin/datatable-bootstrap/bootstrap-5.2.min.css'); 128 wp_enqueue_style('datatables-bootstrap5-css', SINGLE_SIGN_ON_CE21__PLUGIN_URL .'admin/datatable-bootstrap/dataTables.bootstrap5.min.css'); 129 129 130 130 // Enqueue Bootstrap and DataTables JS 131 wp_enqueue_script('bootstrap-bundle-js', plugins_url('admin/datatable-bootstrap/bootstrap.bundle.min.js', __FILE__), array('jquery'), null, false);132 wp_enqueue_script('datatables-js', plugins_url('admin/datatable-bootstrap/jquery.dataTables.min.js', __FILE__), array('jquery'), null, false);133 wp_enqueue_script('datatables-bootstrap5', plugins_url('admin/datatable-bootstrap/dataTables.bootstrap5.min.js', __FILE__), array('jquery'), null, false);131 wp_enqueue_script('bootstrap-bundle-js', SINGLE_SIGN_ON_CE21__PLUGIN_URL .'admin/datatable-bootstrap/bootstrap.bundle.min.js', array('jquery'), null, false); 132 wp_enqueue_script('datatables-js', SINGLE_SIGN_ON_CE21__PLUGIN_URL .'admin/datatable-bootstrap/jquery.dataTables.min.js', array('jquery'), null, false); 133 wp_enqueue_script('datatables-bootstrap5', SINGLE_SIGN_ON_CE21__PLUGIN_URL .'admin/datatable-bootstrap/dataTables.bootstrap5.min.js', array('jquery'), null, false); 134 134 135 135 // Initialize DataTable with custom options -
ce21-suite/tags/2.2.1/single-sign-on-ce21.php
r3203632 r3205463 243 243 $log .= ' try'.PHP_EOL; 244 244 245 246 $key_ce21 = 'ixqv4z0ZOY0bmNCjBK7v3wgijyAv0D3jvyt6bk3lpEDUtVxdR72ZjuGW1hcR6TP'; 245 $api_settings = get_ce21_ss_api_settings_data(); 246 $token_info = get_access_token(); 247 $access_token = $token_info['access_token']; 248 249 $api_url = $api_settings->BaseURL .'/wp/jwtkeystring'; 250 $args = array( 251 'headers' => array( 252 'Authorization' => 'Bearer ' . $access_token, 253 ), 254 ); 255 $response = wp_remote_get($api_url, $args); 256 257 if (is_wp_error($response)) { 258 $error_message = $response->get_error_message(); 259 echo 'Error: ' . $error_message; 260 return; 261 } 262 263 $response_body = wp_remote_retrieve_body($response); 264 $key_ce21 = trim($response_body, '"'); 265 247 266 $user_data = JWT::decode( $token_ce21, new Key( $key_ce21 , 'HS256')); 248 267 $log .= 'User Data: ' . print_r($user_data, true) . PHP_EOL; -
ce21-suite/trunk/programs/ce21-programs-functions.php
r3203632 r3205463 125 125 126 126 // Enqueue DataTables CSS and JS 127 wp_enqueue_style('datatables-bootstrap5-2-css', plugins_url('admin/datatable-bootstrap/bootstrap-5.2.min.css', __FILE__));128 wp_enqueue_style('datatables-bootstrap5-css', plugins_url('admin/datatable-bootstrap/dataTables.bootstrap5.min.css', __FILE__));127 wp_enqueue_style('datatables-bootstrap5-2-css', SINGLE_SIGN_ON_CE21__PLUGIN_URL .'admin/datatable-bootstrap/bootstrap-5.2.min.css'); 128 wp_enqueue_style('datatables-bootstrap5-css', SINGLE_SIGN_ON_CE21__PLUGIN_URL .'admin/datatable-bootstrap/dataTables.bootstrap5.min.css'); 129 129 130 130 // Enqueue Bootstrap and DataTables JS 131 wp_enqueue_script('bootstrap-bundle-js', plugins_url('admin/datatable-bootstrap/bootstrap.bundle.min.js', __FILE__), array('jquery'), null, false);132 wp_enqueue_script('datatables-js', plugins_url('admin/datatable-bootstrap/jquery.dataTables.min.js', __FILE__), array('jquery'), null, false);133 wp_enqueue_script('datatables-bootstrap5', plugins_url('admin/datatable-bootstrap/dataTables.bootstrap5.min.js', __FILE__), array('jquery'), null, false);131 wp_enqueue_script('bootstrap-bundle-js', SINGLE_SIGN_ON_CE21__PLUGIN_URL .'admin/datatable-bootstrap/bootstrap.bundle.min.js', array('jquery'), null, false); 132 wp_enqueue_script('datatables-js', SINGLE_SIGN_ON_CE21__PLUGIN_URL .'admin/datatable-bootstrap/jquery.dataTables.min.js', array('jquery'), null, false); 133 wp_enqueue_script('datatables-bootstrap5', SINGLE_SIGN_ON_CE21__PLUGIN_URL .'admin/datatable-bootstrap/dataTables.bootstrap5.min.js', array('jquery'), null, false); 134 134 135 135 // Initialize DataTable with custom options -
ce21-suite/trunk/single-sign-on-ce21.php
r3203632 r3205463 243 243 $log .= ' try'.PHP_EOL; 244 244 245 246 $key_ce21 = 'ixqv4z0ZOY0bmNCjBK7v3wgijyAv0D3jvyt6bk3lpEDUtVxdR72ZjuGW1hcR6TP'; 245 $api_settings = get_ce21_ss_api_settings_data(); 246 $token_info = get_access_token(); 247 $access_token = $token_info['access_token']; 248 249 $api_url = $api_settings->BaseURL .'/wp/jwtkeystring'; 250 $args = array( 251 'headers' => array( 252 'Authorization' => 'Bearer ' . $access_token, 253 ), 254 ); 255 $response = wp_remote_get($api_url, $args); 256 257 if (is_wp_error($response)) { 258 $error_message = $response->get_error_message(); 259 echo 'Error: ' . $error_message; 260 return; 261 } 262 263 $response_body = wp_remote_retrieve_body($response); 264 $key_ce21 = trim($response_body, '"'); 265 247 266 $user_data = JWT::decode( $token_ce21, new Key( $key_ce21 , 'HS256')); 248 267 $log .= 'User Data: ' . print_r($user_data, true) . PHP_EOL;
Note: See TracChangeset
for help on using the changeset viewer.