Changeset 2714827
- Timestamp:
- 04/26/2022 11:46:43 AM (4 years ago)
- Location:
- authress
- Files:
-
- 25 edited
- 1 copied
-
assets/readme.txt (modified) (1 diff)
-
tags/0.2.68 (copied) (copied from authress/trunk)
-
tags/0.2.68/Authress_Sso_Login.php (modified) (4 diffs)
-
tags/0.2.68/lib/Authress_Sso_Login_Admin_Generic.php (modified) (2 diffs)
-
tags/0.2.68/lib/Authress_Sso_Login_LoginManager.php (modified) (5 diffs)
-
tags/0.2.68/lib/Authress_Sso_Login_Options.php (modified) (1 diff)
-
tags/0.2.68/lib/Authress_Sso_Login_Settings_Configuration.php (modified) (4 diffs)
-
tags/0.2.68/readme.txt (modified) (1 diff)
-
tags/0.2.68/vendor/autoload.php (modified) (1 diff)
-
tags/0.2.68/vendor/composer/InstalledVersions.php (modified) (2 diffs)
-
tags/0.2.68/vendor/composer/autoload_real.php (modified) (5 diffs)
-
tags/0.2.68/vendor/composer/autoload_static.php (modified) (2 diffs)
-
tags/0.2.68/vendor/composer/installed.php (modified) (2 diffs)
-
tags/0.2.68/wordpress/readme.txt (modified) (1 diff)
-
trunk/Authress_Sso_Login.php (modified) (4 diffs)
-
trunk/lib/Authress_Sso_Login_Admin_Generic.php (modified) (2 diffs)
-
trunk/lib/Authress_Sso_Login_LoginManager.php (modified) (5 diffs)
-
trunk/lib/Authress_Sso_Login_Options.php (modified) (1 diff)
-
trunk/lib/Authress_Sso_Login_Settings_Configuration.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/vendor/autoload.php (modified) (1 diff)
-
trunk/vendor/composer/InstalledVersions.php (modified) (2 diffs)
-
trunk/vendor/composer/autoload_real.php (modified) (5 diffs)
-
trunk/vendor/composer/autoload_static.php (modified) (2 diffs)
-
trunk/vendor/composer/installed.php (modified) (2 diffs)
-
trunk/wordpress/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
authress/assets/readme.txt
r2711496 r2714827 5 5 Requires PHP: 7.4 6 6 Tested up to: 5.9.1 7 Stable tag: 0.2.6 67 Stable tag: 0.2.68 8 8 License: Apache-2.0 9 9 License URI: https://github.com/Authress/wordpress-sso-login/blob/main/LICENSE -
authress/tags/0.2.68/Authress_Sso_Login.php
r2711496 r2714827 4 4 Plugin URI: https://wordpress.org/plugins/authress 5 5 Description: Upgrades the WordPress login to support SSO Login. 6 Version: 0.2.6 66 Version: 0.2.68 7 7 Author: Authress 8 8 Author URI: https://authress.io … … 11 11 */ 12 12 13 define( 'AUTHRESS_SSO_LOGIN_VERSION', '0.2.6 6' );13 define( 'AUTHRESS_SSO_LOGIN_VERSION', '0.2.68' ); 14 14 15 15 define( 'AUTHRESS_SSO_LOGIN_PLUGIN_FILE', __FILE__ ); … … 96 96 97 97 /** 98 * Core WP hooks98 * Enable wp_safe_redirect to redirect to these hosts 99 99 * 100 100 * @param string $hosts … … 102 102 103 103 function authress_sso_login_add_allowed_redirect_hosts( $hosts ) { 104 authress_debug_log('=> authress_sso_login_add_allowed_redirect_hosts'); 104 105 $hosts[] = 'authress.io'; 105 $hosts[] = authress_get_configuration_data_from_key( 'domain' ); 106 $hosts[] = authress_get_configuration_data_from_key( 'customDomain' ); 107 $hosts[] = authress_get_configuration_data_from_key( 'authress_server_domain' ); 106 $hosts[] = str_replace("https://", "", authress_get_configuration_data_from_key( 'domain' )); 107 $hosts[] = str_replace("https://", "", authress_get_configuration_data_from_key( 'customDomain' )); 108 $hosts[] = str_replace("https://", "", authress_get_configuration_data_from_key( 'authress_server_domain' )); 109 110 authress_debug_log(' Setting safe redirects: ' . implode(",", $hosts)); 108 111 return $hosts; 109 112 } -
authress/tags/0.2.68/lib/Authress_Sso_Login_Admin_Generic.php
r2690169 r2714827 190 190 protected function render_field_description( $text ) { 191 191 $period = ! in_array( $text[ strlen( $text ) - 1 ], [ '.', ':' ], true ) ? '.' : ''; 192 printf( '<div class="subelement"><span class="description">%s%s</span></div>', esc_attr($text), esc_attr($period) ); 192 // The field descriptions are already sanitized no reason to force this to happen again, and often are being passed in html as well, which should not be sanitized. 193 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 194 printf( '<div class="subelement"><span class="description">%s%s</span></div>', $text, esc_attr($period) ); 193 195 } 194 196 … … 210 212 * 211 213 * @param string $path - dashboard sub-section, if any 214 * @param string $name - name of location in Authress management portal 212 215 * 213 216 * @return string 214 217 */ 215 protected function get_dashboard_link( $path = '' ) {216 return sprintf('<a href="https://authress.io/app/#/setup?focus=%s" target="_blank">%s</a>', $path, __( 'Authress management portal', 'wp-authress' ));218 protected function get_dashboard_link( $path = '', $name = 'management portal') { 219 return sprintf('<a href="https://authress.io/app/#/setup?focus=%s" target="_blank">%s</a>', $path, __( 'Authress ', 'wp-authress' ) . $name); 217 220 } 218 221 -
authress/tags/0.2.68/lib/Authress_Sso_Login_LoginManager.php
r2710778 r2714827 279 279 */ 280 280 public function logout() { 281 authress_debug_log('=> LoginManager.logout'); 282 283 if (!isset($_COOKIE['user']) && !isset($_COOKIE['authorization'])) { 284 authress_debug_log(" User not logged in, going to login screen."); 285 wp_safe_redirect(wp_login_url()); 286 exit(); 287 } 288 281 289 setcookie('user', ''); 282 290 setcookie('authorization', ''); … … 285 293 } 286 294 287 wp_safe_redirect( home_url() ); 295 $authressLoginHostUrl = $this->a0_options->get('customDomain'); 296 $applicationId = $this->a0_options->get('applicationId'); 297 298 $authressLogoutUrl = $authressLoginHostUrl . "/logout?" . build_query(array( 299 "redirect_uri" => rawurlencode(home_url()), 300 "client_id" => $applicationId 301 )); 302 303 authress_debug_log(" Logout Redirect: " . $authressLogoutUrl); 304 305 wp_safe_redirect( $authressLogoutUrl ); 306 exit(); 288 307 } 289 308 … … 322 341 // Log the user out completely. 323 342 wp_destroy_current_session(); 324 wp_logout();325 343 wp_clear_auth_cookie(); 326 344 wp_set_current_user( 0 ); 327 wp_ safe_redirect(wp_login_url());345 wp_logout(); 328 346 exit; 329 330 // $html = sprintf(331 // '%s: %s [%s: %s]<br><br><a href="%s">%s</a>',332 // __( 'There was a problem with your log in', 'wp-authress' ),333 // ! empty( $msg )334 // ? sanitize_text_field( $msg )335 // : __( 'Please see the site administrator', 'wp-authress' ),336 // __( 'error code', 'wp-authress' ),337 // $code ? sanitize_text_field( $code ) : __( 'unknown', 'wp-authress' ),338 // $this->authress_logout_url( wp_login_url() ),339 // __( '← Login', 'wp-authress' )340 // );341 342 // wp_die($html);343 347 } 344 348 … … 350 354 private function decode_id_token( $id_token ) { 351 355 authress_debug_log('=> decode_id_token()'); 352 $expectedIss = $this->a0_options->get _auth_domain();356 $expectedIss = $this->a0_options->get('customDomain'); 353 357 354 358 $config = Configuration::forUnsecuredSigner(); … … 421 425 return $id_token_obj; 422 426 } 423 424 /**425 * Generate the Authress logout URL.426 *427 * @param string|null $return_to - Site URL to return to after logging out.428 *429 * @return string430 *431 * @codeCoverageIgnore - Private method432 */433 private function authress_logout_url( $return_to = null ) {434 return sprintf('/wp-login.php?action=logout');435 }436 427 } -
authress/tags/0.2.68/lib/Authress_Sso_Login_Options.php
r2690169 r2714827 283 283 $site_url = site_url( 'index.php', $protocol ); 284 284 return add_query_arg( 'authress', 1, $site_url ); 285 }286 287 /**288 * Get the authentication domain.289 *290 * @return string291 */292 public function get_auth_domain() {293 $domain = $this->get( 'customDomain' );294 if ( empty( $domain ) ) {295 $domain = $this->get( 'domain' );296 }297 return $domain;298 285 } 299 286 -
authress/tags/0.2.68/lib/Authress_Sso_Login_Settings_Configuration.php
r2688858 r2714827 52 52 53 53 /** 54 * Render form field and description for the `domain` option.55 * IMPORTANT: Internal callback use only, do not call this function directly!56 *57 * @param array $args - callback args passed in from add_settings_field().58 *59 * @see Authress_Sso_Login_Admin_Generic::init_option_section()60 * @see add_settings_field()61 */62 public function render_domain( $args = [] ) {63 64 $style = $this->options->get( $args['opt_name'] ) ? '' : self::ERROR_FIELD_STYLE;65 $this->render_text_field( $args['label_for'], $args['opt_name'], 'text', '', $style );66 $this->render_field_description(67 __( 'Authress Domain, found in your Application settings in the ', 'wp-authress' ) .68 $this->get_dashboard_link( 'applications' )69 );70 }71 72 /**73 54 * Render form field and description for the `custom_domain` option. 74 55 * IMPORTANT: Internal callback use only, do not call this function directly! … … 84 65 $style = $this->options->get( $args['opt_name'] ) ? '' : self::ERROR_FIELD_STYLE; 85 66 $this->render_text_field( $args['label_for'], $args['opt_name'], 'text', '', $style ); 86 $this->render_field_description(__( 'Your custom domain host url, found in the domain settings in the ', 'wp-authress' ) . $this->get_dashboard_link( 'domains' ));67 $this->render_field_description(__( 'Your custom domain host url, found in the domain settings in the ', 'wp-authress' ) . $this->get_dashboard_link( 'domains', 'custom domains configuration' )); 87 68 } 88 69 … … 99 80 $style = $this->options->get( $args['opt_name'] ) ? '' : self::ERROR_FIELD_STYLE; 100 81 $this->render_text_field( $args['label_for'], $args['opt_name'], 'password', '', $style ); 101 $this->render_field_description(__( 'Authress Service Client Access Key, found in the service client settings in the ', 'wp-authress' ) . $this->get_dashboard_link( 'clients' ));82 $this->render_field_description(__( 'Authress Service Client Access Key, found in the service client settings in the ', 'wp-authress' ) . $this->get_dashboard_link( 'clients', 'service clients section' )); 102 83 } 103 84 … … 114 95 $style = $this->options->get( $args['opt_name'] ) ? '' : self::ERROR_FIELD_STYLE; 115 96 $this->render_text_field( $args['label_for'], $args['opt_name'], 'text', '', $style ); 116 $this->render_field_description(__( 'Identifier for this WordPress deployment, found in your Application settings in the ', 'wp-authress' ) . $this->get_dashboard_link( 'applications' ));97 $this->render_field_description(__( 'Identifier for this WordPress deployment, found in your Application settings in the ', 'wp-authress' ) . $this->get_dashboard_link( 'applications', 'applications configuration' )); 117 98 } 118 99 -
authress/tags/0.2.68/readme.txt
r2711496 r2714827 5 5 Requires PHP: 7.4 6 6 Tested up to: 5.9.1 7 Stable tag: 0.2.6 67 Stable tag: 0.2.68 8 8 License: Apache-2.0 9 9 License URI: https://github.com/Authress/wordpress-sso-login/blob/main/LICENSE -
authress/tags/0.2.68/vendor/autoload.php
r2711496 r2714827 5 5 require_once __DIR__ . '/composer/autoload_real.php'; 6 6 7 return ComposerAutoloaderInit4 be75cc2ae0a62b3eefefe681888a661::getLoader();7 return ComposerAutoloaderInit4db6591791311dc6f01035eac12e2bb6::getLoader(); -
authress/tags/0.2.68/vendor/composer/InstalledVersions.php
r2711496 r2714827 31 31 array ( 32 32 ), 33 'reference' => ' 833c0d646bdb9acbf738683c7907524d776e9c7c',33 'reference' => '5a26c71f3314a427461cccda1706f8666932b650', 34 34 'name' => 'authress/wordpress-plugin.php', 35 35 ), … … 43 43 array ( 44 44 ), 45 'reference' => ' 833c0d646bdb9acbf738683c7907524d776e9c7c',45 'reference' => '5a26c71f3314a427461cccda1706f8666932b650', 46 46 ), 47 47 'codercat/jwk-to-pem' => -
authress/tags/0.2.68/vendor/composer/autoload_real.php
r2711496 r2714827 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit4 be75cc2ae0a62b3eefefe681888a6615 class ComposerAutoloaderInit4db6591791311dc6f01035eac12e2bb6 6 6 { 7 7 private static $loader; … … 25 25 require __DIR__ . '/platform_check.php'; 26 26 27 spl_autoload_register(array('ComposerAutoloaderInit4 be75cc2ae0a62b3eefefe681888a661', 'loadClassLoader'), true, true);27 spl_autoload_register(array('ComposerAutoloaderInit4db6591791311dc6f01035eac12e2bb6', 'loadClassLoader'), true, true); 28 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); 29 spl_autoload_unregister(array('ComposerAutoloaderInit4 be75cc2ae0a62b3eefefe681888a661', 'loadClassLoader'));29 spl_autoload_unregister(array('ComposerAutoloaderInit4db6591791311dc6f01035eac12e2bb6', 'loadClassLoader')); 30 30 31 31 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); … … 33 33 require __DIR__ . '/autoload_static.php'; 34 34 35 call_user_func(\Composer\Autoload\ComposerStaticInit4 be75cc2ae0a62b3eefefe681888a661::getInitializer($loader));35 call_user_func(\Composer\Autoload\ComposerStaticInit4db6591791311dc6f01035eac12e2bb6::getInitializer($loader)); 36 36 } else { 37 37 $map = require __DIR__ . '/autoload_namespaces.php'; … … 54 54 55 55 if ($useStaticLoader) { 56 $includeFiles = Composer\Autoload\ComposerStaticInit4 be75cc2ae0a62b3eefefe681888a661::$files;56 $includeFiles = Composer\Autoload\ComposerStaticInit4db6591791311dc6f01035eac12e2bb6::$files; 57 57 } else { 58 58 $includeFiles = require __DIR__ . '/autoload_files.php'; 59 59 } 60 60 foreach ($includeFiles as $fileIdentifier => $file) { 61 composerRequire4 be75cc2ae0a62b3eefefe681888a661($fileIdentifier, $file);61 composerRequire4db6591791311dc6f01035eac12e2bb6($fileIdentifier, $file); 62 62 } 63 63 … … 66 66 } 67 67 68 function composerRequire4 be75cc2ae0a62b3eefefe681888a661($fileIdentifier, $file)68 function composerRequire4db6591791311dc6f01035eac12e2bb6($fileIdentifier, $file) 69 69 { 70 70 if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { -
authress/tags/0.2.68/vendor/composer/autoload_static.php
r2711496 r2714827 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit4 be75cc2ae0a62b3eefefe681888a6617 class ComposerStaticInit4db6591791311dc6f01035eac12e2bb6 8 8 { 9 9 public static $files = array ( … … 631 631 { 632 632 return \Closure::bind(function () use ($loader) { 633 $loader->prefixLengthsPsr4 = ComposerStaticInit4 be75cc2ae0a62b3eefefe681888a661::$prefixLengthsPsr4;634 $loader->prefixDirsPsr4 = ComposerStaticInit4 be75cc2ae0a62b3eefefe681888a661::$prefixDirsPsr4;635 $loader->fallbackDirsPsr4 = ComposerStaticInit4 be75cc2ae0a62b3eefefe681888a661::$fallbackDirsPsr4;636 $loader->classMap = ComposerStaticInit4 be75cc2ae0a62b3eefefe681888a661::$classMap;633 $loader->prefixLengthsPsr4 = ComposerStaticInit4db6591791311dc6f01035eac12e2bb6::$prefixLengthsPsr4; 634 $loader->prefixDirsPsr4 = ComposerStaticInit4db6591791311dc6f01035eac12e2bb6::$prefixDirsPsr4; 635 $loader->fallbackDirsPsr4 = ComposerStaticInit4db6591791311dc6f01035eac12e2bb6::$fallbackDirsPsr4; 636 $loader->classMap = ComposerStaticInit4db6591791311dc6f01035eac12e2bb6::$classMap; 637 637 638 638 }, null, ClassLoader::class); -
authress/tags/0.2.68/vendor/composer/installed.php
r2711496 r2714827 7 7 array ( 8 8 ), 9 'reference' => ' 833c0d646bdb9acbf738683c7907524d776e9c7c',9 'reference' => '5a26c71f3314a427461cccda1706f8666932b650', 10 10 'name' => 'authress/wordpress-plugin.php', 11 11 ), … … 19 19 array ( 20 20 ), 21 'reference' => ' 833c0d646bdb9acbf738683c7907524d776e9c7c',21 'reference' => '5a26c71f3314a427461cccda1706f8666932b650', 22 22 ), 23 23 'codercat/jwk-to-pem' => -
authress/tags/0.2.68/wordpress/readme.txt
r2711496 r2714827 5 5 Requires PHP: 7.4 6 6 Tested up to: 5.9.1 7 Stable tag: 0.2.6 67 Stable tag: 0.2.68 8 8 License: Apache-2.0 9 9 License URI: https://github.com/Authress/wordpress-sso-login/blob/main/LICENSE -
authress/trunk/Authress_Sso_Login.php
r2711496 r2714827 4 4 Plugin URI: https://wordpress.org/plugins/authress 5 5 Description: Upgrades the WordPress login to support SSO Login. 6 Version: 0.2.6 66 Version: 0.2.68 7 7 Author: Authress 8 8 Author URI: https://authress.io … … 11 11 */ 12 12 13 define( 'AUTHRESS_SSO_LOGIN_VERSION', '0.2.6 6' );13 define( 'AUTHRESS_SSO_LOGIN_VERSION', '0.2.68' ); 14 14 15 15 define( 'AUTHRESS_SSO_LOGIN_PLUGIN_FILE', __FILE__ ); … … 96 96 97 97 /** 98 * Core WP hooks98 * Enable wp_safe_redirect to redirect to these hosts 99 99 * 100 100 * @param string $hosts … … 102 102 103 103 function authress_sso_login_add_allowed_redirect_hosts( $hosts ) { 104 authress_debug_log('=> authress_sso_login_add_allowed_redirect_hosts'); 104 105 $hosts[] = 'authress.io'; 105 $hosts[] = authress_get_configuration_data_from_key( 'domain' ); 106 $hosts[] = authress_get_configuration_data_from_key( 'customDomain' ); 107 $hosts[] = authress_get_configuration_data_from_key( 'authress_server_domain' ); 106 $hosts[] = str_replace("https://", "", authress_get_configuration_data_from_key( 'domain' )); 107 $hosts[] = str_replace("https://", "", authress_get_configuration_data_from_key( 'customDomain' )); 108 $hosts[] = str_replace("https://", "", authress_get_configuration_data_from_key( 'authress_server_domain' )); 109 110 authress_debug_log(' Setting safe redirects: ' . implode(",", $hosts)); 108 111 return $hosts; 109 112 } -
authress/trunk/lib/Authress_Sso_Login_Admin_Generic.php
r2690169 r2714827 190 190 protected function render_field_description( $text ) { 191 191 $period = ! in_array( $text[ strlen( $text ) - 1 ], [ '.', ':' ], true ) ? '.' : ''; 192 printf( '<div class="subelement"><span class="description">%s%s</span></div>', esc_attr($text), esc_attr($period) ); 192 // The field descriptions are already sanitized no reason to force this to happen again, and often are being passed in html as well, which should not be sanitized. 193 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 194 printf( '<div class="subelement"><span class="description">%s%s</span></div>', $text, esc_attr($period) ); 193 195 } 194 196 … … 210 212 * 211 213 * @param string $path - dashboard sub-section, if any 214 * @param string $name - name of location in Authress management portal 212 215 * 213 216 * @return string 214 217 */ 215 protected function get_dashboard_link( $path = '' ) {216 return sprintf('<a href="https://authress.io/app/#/setup?focus=%s" target="_blank">%s</a>', $path, __( 'Authress management portal', 'wp-authress' ));218 protected function get_dashboard_link( $path = '', $name = 'management portal') { 219 return sprintf('<a href="https://authress.io/app/#/setup?focus=%s" target="_blank">%s</a>', $path, __( 'Authress ', 'wp-authress' ) . $name); 217 220 } 218 221 -
authress/trunk/lib/Authress_Sso_Login_LoginManager.php
r2710778 r2714827 279 279 */ 280 280 public function logout() { 281 authress_debug_log('=> LoginManager.logout'); 282 283 if (!isset($_COOKIE['user']) && !isset($_COOKIE['authorization'])) { 284 authress_debug_log(" User not logged in, going to login screen."); 285 wp_safe_redirect(wp_login_url()); 286 exit(); 287 } 288 281 289 setcookie('user', ''); 282 290 setcookie('authorization', ''); … … 285 293 } 286 294 287 wp_safe_redirect( home_url() ); 295 $authressLoginHostUrl = $this->a0_options->get('customDomain'); 296 $applicationId = $this->a0_options->get('applicationId'); 297 298 $authressLogoutUrl = $authressLoginHostUrl . "/logout?" . build_query(array( 299 "redirect_uri" => rawurlencode(home_url()), 300 "client_id" => $applicationId 301 )); 302 303 authress_debug_log(" Logout Redirect: " . $authressLogoutUrl); 304 305 wp_safe_redirect( $authressLogoutUrl ); 306 exit(); 288 307 } 289 308 … … 322 341 // Log the user out completely. 323 342 wp_destroy_current_session(); 324 wp_logout();325 343 wp_clear_auth_cookie(); 326 344 wp_set_current_user( 0 ); 327 wp_ safe_redirect(wp_login_url());345 wp_logout(); 328 346 exit; 329 330 // $html = sprintf(331 // '%s: %s [%s: %s]<br><br><a href="%s">%s</a>',332 // __( 'There was a problem with your log in', 'wp-authress' ),333 // ! empty( $msg )334 // ? sanitize_text_field( $msg )335 // : __( 'Please see the site administrator', 'wp-authress' ),336 // __( 'error code', 'wp-authress' ),337 // $code ? sanitize_text_field( $code ) : __( 'unknown', 'wp-authress' ),338 // $this->authress_logout_url( wp_login_url() ),339 // __( '← Login', 'wp-authress' )340 // );341 342 // wp_die($html);343 347 } 344 348 … … 350 354 private function decode_id_token( $id_token ) { 351 355 authress_debug_log('=> decode_id_token()'); 352 $expectedIss = $this->a0_options->get _auth_domain();356 $expectedIss = $this->a0_options->get('customDomain'); 353 357 354 358 $config = Configuration::forUnsecuredSigner(); … … 421 425 return $id_token_obj; 422 426 } 423 424 /**425 * Generate the Authress logout URL.426 *427 * @param string|null $return_to - Site URL to return to after logging out.428 *429 * @return string430 *431 * @codeCoverageIgnore - Private method432 */433 private function authress_logout_url( $return_to = null ) {434 return sprintf('/wp-login.php?action=logout');435 }436 427 } -
authress/trunk/lib/Authress_Sso_Login_Options.php
r2690169 r2714827 283 283 $site_url = site_url( 'index.php', $protocol ); 284 284 return add_query_arg( 'authress', 1, $site_url ); 285 }286 287 /**288 * Get the authentication domain.289 *290 * @return string291 */292 public function get_auth_domain() {293 $domain = $this->get( 'customDomain' );294 if ( empty( $domain ) ) {295 $domain = $this->get( 'domain' );296 }297 return $domain;298 285 } 299 286 -
authress/trunk/lib/Authress_Sso_Login_Settings_Configuration.php
r2688858 r2714827 52 52 53 53 /** 54 * Render form field and description for the `domain` option.55 * IMPORTANT: Internal callback use only, do not call this function directly!56 *57 * @param array $args - callback args passed in from add_settings_field().58 *59 * @see Authress_Sso_Login_Admin_Generic::init_option_section()60 * @see add_settings_field()61 */62 public function render_domain( $args = [] ) {63 64 $style = $this->options->get( $args['opt_name'] ) ? '' : self::ERROR_FIELD_STYLE;65 $this->render_text_field( $args['label_for'], $args['opt_name'], 'text', '', $style );66 $this->render_field_description(67 __( 'Authress Domain, found in your Application settings in the ', 'wp-authress' ) .68 $this->get_dashboard_link( 'applications' )69 );70 }71 72 /**73 54 * Render form field and description for the `custom_domain` option. 74 55 * IMPORTANT: Internal callback use only, do not call this function directly! … … 84 65 $style = $this->options->get( $args['opt_name'] ) ? '' : self::ERROR_FIELD_STYLE; 85 66 $this->render_text_field( $args['label_for'], $args['opt_name'], 'text', '', $style ); 86 $this->render_field_description(__( 'Your custom domain host url, found in the domain settings in the ', 'wp-authress' ) . $this->get_dashboard_link( 'domains' ));67 $this->render_field_description(__( 'Your custom domain host url, found in the domain settings in the ', 'wp-authress' ) . $this->get_dashboard_link( 'domains', 'custom domains configuration' )); 87 68 } 88 69 … … 99 80 $style = $this->options->get( $args['opt_name'] ) ? '' : self::ERROR_FIELD_STYLE; 100 81 $this->render_text_field( $args['label_for'], $args['opt_name'], 'password', '', $style ); 101 $this->render_field_description(__( 'Authress Service Client Access Key, found in the service client settings in the ', 'wp-authress' ) . $this->get_dashboard_link( 'clients' ));82 $this->render_field_description(__( 'Authress Service Client Access Key, found in the service client settings in the ', 'wp-authress' ) . $this->get_dashboard_link( 'clients', 'service clients section' )); 102 83 } 103 84 … … 114 95 $style = $this->options->get( $args['opt_name'] ) ? '' : self::ERROR_FIELD_STYLE; 115 96 $this->render_text_field( $args['label_for'], $args['opt_name'], 'text', '', $style ); 116 $this->render_field_description(__( 'Identifier for this WordPress deployment, found in your Application settings in the ', 'wp-authress' ) . $this->get_dashboard_link( 'applications' ));97 $this->render_field_description(__( 'Identifier for this WordPress deployment, found in your Application settings in the ', 'wp-authress' ) . $this->get_dashboard_link( 'applications', 'applications configuration' )); 117 98 } 118 99 -
authress/trunk/readme.txt
r2711496 r2714827 5 5 Requires PHP: 7.4 6 6 Tested up to: 5.9.1 7 Stable tag: 0.2.6 67 Stable tag: 0.2.68 8 8 License: Apache-2.0 9 9 License URI: https://github.com/Authress/wordpress-sso-login/blob/main/LICENSE -
authress/trunk/vendor/autoload.php
r2711496 r2714827 5 5 require_once __DIR__ . '/composer/autoload_real.php'; 6 6 7 return ComposerAutoloaderInit4 be75cc2ae0a62b3eefefe681888a661::getLoader();7 return ComposerAutoloaderInit4db6591791311dc6f01035eac12e2bb6::getLoader(); -
authress/trunk/vendor/composer/InstalledVersions.php
r2711496 r2714827 31 31 array ( 32 32 ), 33 'reference' => ' 833c0d646bdb9acbf738683c7907524d776e9c7c',33 'reference' => '5a26c71f3314a427461cccda1706f8666932b650', 34 34 'name' => 'authress/wordpress-plugin.php', 35 35 ), … … 43 43 array ( 44 44 ), 45 'reference' => ' 833c0d646bdb9acbf738683c7907524d776e9c7c',45 'reference' => '5a26c71f3314a427461cccda1706f8666932b650', 46 46 ), 47 47 'codercat/jwk-to-pem' => -
authress/trunk/vendor/composer/autoload_real.php
r2711496 r2714827 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit4 be75cc2ae0a62b3eefefe681888a6615 class ComposerAutoloaderInit4db6591791311dc6f01035eac12e2bb6 6 6 { 7 7 private static $loader; … … 25 25 require __DIR__ . '/platform_check.php'; 26 26 27 spl_autoload_register(array('ComposerAutoloaderInit4 be75cc2ae0a62b3eefefe681888a661', 'loadClassLoader'), true, true);27 spl_autoload_register(array('ComposerAutoloaderInit4db6591791311dc6f01035eac12e2bb6', 'loadClassLoader'), true, true); 28 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); 29 spl_autoload_unregister(array('ComposerAutoloaderInit4 be75cc2ae0a62b3eefefe681888a661', 'loadClassLoader'));29 spl_autoload_unregister(array('ComposerAutoloaderInit4db6591791311dc6f01035eac12e2bb6', 'loadClassLoader')); 30 30 31 31 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); … … 33 33 require __DIR__ . '/autoload_static.php'; 34 34 35 call_user_func(\Composer\Autoload\ComposerStaticInit4 be75cc2ae0a62b3eefefe681888a661::getInitializer($loader));35 call_user_func(\Composer\Autoload\ComposerStaticInit4db6591791311dc6f01035eac12e2bb6::getInitializer($loader)); 36 36 } else { 37 37 $map = require __DIR__ . '/autoload_namespaces.php'; … … 54 54 55 55 if ($useStaticLoader) { 56 $includeFiles = Composer\Autoload\ComposerStaticInit4 be75cc2ae0a62b3eefefe681888a661::$files;56 $includeFiles = Composer\Autoload\ComposerStaticInit4db6591791311dc6f01035eac12e2bb6::$files; 57 57 } else { 58 58 $includeFiles = require __DIR__ . '/autoload_files.php'; 59 59 } 60 60 foreach ($includeFiles as $fileIdentifier => $file) { 61 composerRequire4 be75cc2ae0a62b3eefefe681888a661($fileIdentifier, $file);61 composerRequire4db6591791311dc6f01035eac12e2bb6($fileIdentifier, $file); 62 62 } 63 63 … … 66 66 } 67 67 68 function composerRequire4 be75cc2ae0a62b3eefefe681888a661($fileIdentifier, $file)68 function composerRequire4db6591791311dc6f01035eac12e2bb6($fileIdentifier, $file) 69 69 { 70 70 if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { -
authress/trunk/vendor/composer/autoload_static.php
r2711496 r2714827 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit4 be75cc2ae0a62b3eefefe681888a6617 class ComposerStaticInit4db6591791311dc6f01035eac12e2bb6 8 8 { 9 9 public static $files = array ( … … 631 631 { 632 632 return \Closure::bind(function () use ($loader) { 633 $loader->prefixLengthsPsr4 = ComposerStaticInit4 be75cc2ae0a62b3eefefe681888a661::$prefixLengthsPsr4;634 $loader->prefixDirsPsr4 = ComposerStaticInit4 be75cc2ae0a62b3eefefe681888a661::$prefixDirsPsr4;635 $loader->fallbackDirsPsr4 = ComposerStaticInit4 be75cc2ae0a62b3eefefe681888a661::$fallbackDirsPsr4;636 $loader->classMap = ComposerStaticInit4 be75cc2ae0a62b3eefefe681888a661::$classMap;633 $loader->prefixLengthsPsr4 = ComposerStaticInit4db6591791311dc6f01035eac12e2bb6::$prefixLengthsPsr4; 634 $loader->prefixDirsPsr4 = ComposerStaticInit4db6591791311dc6f01035eac12e2bb6::$prefixDirsPsr4; 635 $loader->fallbackDirsPsr4 = ComposerStaticInit4db6591791311dc6f01035eac12e2bb6::$fallbackDirsPsr4; 636 $loader->classMap = ComposerStaticInit4db6591791311dc6f01035eac12e2bb6::$classMap; 637 637 638 638 }, null, ClassLoader::class); -
authress/trunk/vendor/composer/installed.php
r2711496 r2714827 7 7 array ( 8 8 ), 9 'reference' => ' 833c0d646bdb9acbf738683c7907524d776e9c7c',9 'reference' => '5a26c71f3314a427461cccda1706f8666932b650', 10 10 'name' => 'authress/wordpress-plugin.php', 11 11 ), … … 19 19 array ( 20 20 ), 21 'reference' => ' 833c0d646bdb9acbf738683c7907524d776e9c7c',21 'reference' => '5a26c71f3314a427461cccda1706f8666932b650', 22 22 ), 23 23 'codercat/jwk-to-pem' => -
authress/trunk/wordpress/readme.txt
r2711496 r2714827 5 5 Requires PHP: 7.4 6 6 Tested up to: 5.9.1 7 Stable tag: 0.2.6 67 Stable tag: 0.2.68 8 8 License: Apache-2.0 9 9 License URI: https://github.com/Authress/wordpress-sso-login/blob/main/LICENSE
Note: See TracChangeset
for help on using the changeset viewer.