From 7012772c1aca2a8653409f9602b00418cab42f8a Mon Sep 17 00:00:00 2001 From: Daniel Bachhuber Date: Mon, 16 Aug 2021 06:27:08 -0700 Subject: [PATCH 1/2] Allow the internal logout args to be filterable --- inc/class-wp-saml-auth.php | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/inc/class-wp-saml-auth.php b/inc/class-wp-saml-auth.php index 58cf583..7ce8bfd 100644 --- a/inc/class-wp-saml-auth.php +++ b/inc/class-wp-saml-auth.php @@ -183,8 +183,26 @@ public function action_wp_logout() { if ( empty( $internal_config['idp']['singleLogoutService']['url'] ) ) { return; } + $args = array( + 'parameters' => array(), + 'nameId' => null, + 'sessionId' => null, + ); + /** + * Permit the arguments passed to the logout() method to be customized. + * + * @param array $args Existing arguments to be passed. + */ + $args = apply_filters( 'wp_saml_auth_internal_logout_args', $args ); + $provider->logout( + add_query_arg( 'loggedout', true, wp_login_url() ), + $args['parameters'], + $args['nameId'], + $args['sessionIndex'] + ); + } else { + $provider->logout( add_query_arg( 'loggedout', true, wp_login_url() ) ); } - $provider->logout( add_query_arg( 'loggedout', true, wp_login_url() ) ); } /** From 26d4cbf8221ab481772936e19415b255f87f509f Mon Sep 17 00:00:00 2001 From: Daniel Bachhuber Date: Wed, 18 Aug 2021 05:28:38 -0700 Subject: [PATCH 2/2] Update README for v1.2.4 --- README.md | 5 ++++- readme.txt | 5 ++++- wp-saml-auth.php | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 18c3d7e..c1e4553 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ **Tags:** authentication, SAML **Requires at least:** 4.4 **Tested up to:** 5.8 -**Stable tag:** 1.2.3 +**Stable tag:** 1.2.4 **License:** GPLv2 or later **License URI:** http://www.gnu.org/licenses/gpl-2.0.html @@ -277,6 +277,9 @@ There is no third step. Because SimpleSAMLphp loads WordPress, which has WP Nati ## Changelog ## +### 1.2.4 (August 18, 2021) ### +* Adds a `wp_saml_auth_internal_logout_args` filter to allow the internal logout args to be filterable [[#255](https://github.com/pantheon-systems/wp-saml-auth/pull/255)]. + ### 1.2.3 (May 25, 2021) ### * Adds a `wp_saml_auth_force_authn` filter to allow forceAuthn="true" to be enabled [[#248](https://github.com/pantheon-systems/wp-saml-auth/pull/248)]. diff --git a/readme.txt b/readme.txt index d2be5c1..8d02314 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: getpantheon, danielbachhuber, Outlandish Josh Tags: authentication, SAML Requires at least: 4.4 Tested up to: 5.8 -Stable tag: 1.2.3 +Stable tag: 1.2.4 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -277,6 +277,9 @@ There is no third step. Because SimpleSAMLphp loads WordPress, which has WP Nati == Changelog == += 1.2.4 (August 18, 2021) = +* Adds a `wp_saml_auth_internal_logout_args` filter to allow the internal logout args to be filterable [[#255](https://github.com/pantheon-systems/wp-saml-auth/pull/255)]. + = 1.2.3 (May 25, 2021) = * Adds a `wp_saml_auth_force_authn` filter to allow forceAuthn="true" to be enabled [[#248](https://github.com/pantheon-systems/wp-saml-auth/pull/248)]. diff --git a/wp-saml-auth.php b/wp-saml-auth.php index 7f5ee46..63907c4 100644 --- a/wp-saml-auth.php +++ b/wp-saml-auth.php @@ -1,7 +1,7 @@