Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add wp_saml_auth_pre_logout action to fire before logout #274

Merged
merged 2 commits into from
Dec 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# WP SAML Auth #
**Contributors:** [getpantheon](https://profiles.wordpress.org/getpantheon/), [danielbachhuber](https://profiles.wordpress.org/danielbachhuber/), [Outlandish Josh](https://profiles.wordpress.org/outlandish-josh/)
**Contributors:** [getpantheon](https://profiles.wordpress.org/getpantheon/), [danielbachhuber](https://profiles.wordpress.org/danielbachhuber/), [outlandish-josh](https://profiles.wordpress.org/outlandish-josh/)
**Tags:** authentication, SAML
**Requires at least:** 4.4
**Tested up to:** 5.8
**Stable tag:** 1.2.6
**Stable tag:** 1.2.7
**License:** GPLv2 or later
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -277,6 +277,9 @@ There is no third step. Because SimpleSAMLphp loads WordPress, which has WP Nati

## Changelog ##

### 1.2.7 (December 9, 2021) ###
* Adds a `wp_saml_auth_pre_logout` action that fires before logout [[#274](https://github.com/pantheon-systems/wp-saml-auth/pull/274)].

### 1.2.6 (October 12, 2021) ###
* Adds a `wp_saml_auth_login_parameters` filter to allow login parameters to be filtered [[#262](https://github.com/pantheon-systems/wp-saml-auth/pull/262)].

Expand Down
4 changes: 4 additions & 0 deletions inc/class-wp-saml-auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,10 @@ public function action_login_message( $message ) {
* Log the user out of the SAML instance when they log out of WordPress
*/
public function action_wp_logout() {
/**
* Fires before the user is logged out.
*/
do_action( 'wp_saml_auth_pre_logout' );
$provider = $this->get_provider();
if ( 'internal' === self::get_option( 'connection_type' ) ) {
$internal_config = self::get_option( 'internal_config' );
Expand Down
78 changes: 39 additions & 39 deletions languages/wp-saml-auth.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
# This file is distributed under the same license as the WP SAML Auth plugin.
msgid ""
msgstr ""
"Project-Id-Version: WP SAML Auth 1.2.3\n"
"Project-Id-Version: WP SAML Auth 1.2.7\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-saml-auth\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2021-05-25T12:43:53+00:00\n"
"POT-Creation-Date: 2021-12-09T16:26:03+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.5.0\n"
"X-Domain: wp-saml-auth\n"
Expand Down Expand Up @@ -63,122 +63,122 @@ msgid "Settings"
msgstr ""

#. translators: Field label.
#: inc/class-wp-saml-auth-settings.php:215
#: inc/class-wp-saml-auth-settings.php:218
msgid "%s is a required field"
msgstr ""

#. translators: Field label.
#: inc/class-wp-saml-auth-settings.php:239
#: inc/class-wp-saml-auth-settings.php:242
msgid "%s is not a valid URL."
msgstr ""

#. translators: Field label.
#: inc/class-wp-saml-auth-settings.php:253
#: inc/class-wp-saml-auth-settings.php:256
msgid "%s is not a valid certificate path."
msgstr ""

#: inc/class-wp-saml-auth-settings.php:293
#: inc/class-wp-saml-auth-settings.php:295
msgid "Service Provider Settings"
msgstr ""

#: inc/class-wp-saml-auth-settings.php:294
#: inc/class-wp-saml-auth-settings.php:296
msgid "Identity Provider Settings"
msgstr ""

#: inc/class-wp-saml-auth-settings.php:295
#: inc/class-wp-saml-auth-settings.php:297
msgid "Attribute Mappings"
msgstr ""

#: inc/class-wp-saml-auth-settings.php:311
#: inc/class-wp-saml-auth-settings.php:313
msgid "Auto Provision"
msgstr ""

#: inc/class-wp-saml-auth-settings.php:313
#: inc/class-wp-saml-auth-settings.php:315
msgid "If checked, create a new WordPress user upon login. <br>If unchecked, WordPress user will already need to exist in order to log in."
msgstr ""

#: inc/class-wp-saml-auth-settings.php:319
#: inc/class-wp-saml-auth-settings.php:321
msgid "Permit WordPress login"
msgstr ""

#: inc/class-wp-saml-auth-settings.php:321
#: inc/class-wp-saml-auth-settings.php:323
msgid "If checked, WordPress user can also log in with the standard username and password flow."
msgstr ""

#: inc/class-wp-saml-auth-settings.php:327
#: inc/class-wp-saml-auth-settings.php:329
msgid "Get User By"
msgstr ""

#: inc/class-wp-saml-auth-settings.php:333
#: inc/class-wp-saml-auth-settings.php:335
msgid "Attribute by which SAML requests are matched to WordPress users."
msgstr ""

#: inc/class-wp-saml-auth-settings.php:339
#: inc/class-wp-saml-auth-settings.php:341
msgid "Base URL"
msgstr ""

#: inc/class-wp-saml-auth-settings.php:341
#: inc/class-wp-saml-auth-settings.php:343
msgid "The base url to be used when constructing URLs."
msgstr ""

#: inc/class-wp-saml-auth-settings.php:348
#: inc/class-wp-saml-auth-settings.php:368
#: inc/class-wp-saml-auth-settings.php:350
#: inc/class-wp-saml-auth-settings.php:370
msgid "Entity Id (Required)"
msgstr ""

#: inc/class-wp-saml-auth-settings.php:351
#: inc/class-wp-saml-auth-settings.php:353
msgid "SP (WordPress) entity identifier."
msgstr ""

#: inc/class-wp-saml-auth-settings.php:358
#: inc/class-wp-saml-auth-settings.php:360
msgid "Assertion Consumer Service URL (Required)"
msgstr ""

#: inc/class-wp-saml-auth-settings.php:360
#: inc/class-wp-saml-auth-settings.php:362
msgid "URL where the response from the IdP should be returned (usually the login URL)."
msgstr ""

#: inc/class-wp-saml-auth-settings.php:370
#: inc/class-wp-saml-auth-settings.php:372
msgid "IdP entity identifier."
msgstr ""

#: inc/class-wp-saml-auth-settings.php:376
#: inc/class-wp-saml-auth-settings.php:378
msgid "Single SignOn Service URL (Required)"
msgstr ""

#: inc/class-wp-saml-auth-settings.php:378
#: inc/class-wp-saml-auth-settings.php:380
msgid "URL of the IdP where the SP (WordPress) will send the authentication request."
msgstr ""

#: inc/class-wp-saml-auth-settings.php:384
#: inc/class-wp-saml-auth-settings.php:386
msgid "Single Logout Service URL"
msgstr ""

#: inc/class-wp-saml-auth-settings.php:386
#: inc/class-wp-saml-auth-settings.php:388
msgid "URL of the IdP where the SP (WordPress) will send the signout request."
msgstr ""

#: inc/class-wp-saml-auth-settings.php:391
#: inc/class-wp-saml-auth-settings.php:393
msgid "x509 Cerificate Path"
msgstr ""

#: inc/class-wp-saml-auth-settings.php:393
#: inc/class-wp-saml-auth-settings.php:395
msgid "Path to the x509 certificate file, used for verifying the request.<br/>Include <code>ABSPATH</code> to set path base to WordPress' ABSPATH constant."
msgstr ""

#: inc/class-wp-saml-auth-settings.php:398
#: inc/class-wp-saml-auth-settings.php:400
msgid "Certificate Fingerprint"
msgstr ""

#: inc/class-wp-saml-auth-settings.php:400
#: inc/class-wp-saml-auth-settings.php:402
msgid "If not using x509 certificate, paste the certificate fingerprint and specify the fingerprint algorithm below."
msgstr ""

#: inc/class-wp-saml-auth-settings.php:405
#: inc/class-wp-saml-auth-settings.php:407
msgid "Certificate Fingerprint Algorithm"
msgstr ""

#: inc/class-wp-saml-auth-settings.php:408
#: inc/class-wp-saml-auth-settings.php:410
msgid "N/A"
msgstr ""

Expand All @@ -195,32 +195,32 @@ msgid "Or, sign in with WordPress:"
msgstr ""

#. Translators: Includes error reason from OneLogin.
#: inc/class-wp-saml-auth.php:238
#: inc/class-wp-saml-auth.php:260
msgid "User is not authenticated with SAML IdP. Reason: %s"
msgstr ""

#: inc/class-wp-saml-auth.php:297
#: inc/class-wp-saml-auth.php:327
msgid "Invalid provider specified for SAML authentication"
msgstr ""

#: inc/class-wp-saml-auth.php:322
#: inc/class-wp-saml-auth.php:352
msgid "No attributes were present in SAML response. Attributes are used to create and fetch users. Please contact your administrator"
msgstr ""

#. Translators: Communicates how the user is fetched based on the SAML response.
#: inc/class-wp-saml-auth.php:329
#: inc/class-wp-saml-auth.php:359
msgid "\"%1$s\" attribute is expected, but missing, in SAML response. Attribute is used to fetch existing user by \"%2$s\". Please contact your administrator."
msgstr ""

#: inc/class-wp-saml-auth.php:344
#: inc/class-wp-saml-auth.php:374
msgid "No WordPress user exists for your account. Please contact your administrator."
msgstr ""

#. Translators: Links to the WP SAML Auth plugin.
#: inc/class-wp-saml-auth.php:396
#: inc/class-wp-saml-auth.php:426
msgid "WP SAML Auth wasn't able to find the <code>OneLogin\\Saml2\\Auth</code> class. Please verify your Composer autoloader, or <a href='%s'>visit the plugin page</a> for more information."
msgstr ""

#: inc/class-wp-saml-auth.php:407
#: inc/class-wp-saml-auth.php:437
msgid "WP SAML Auth wasn't able to find the <code>%1$s</code> class. Please check the <code>simplesamlphp_autoload</code> configuration option, or <a href='%2$s'>visit the plugin page</a> for more information."
msgstr ""
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.6
Stable tag: 1.2.7
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -277,6 +277,9 @@ There is no third step. Because SimpleSAMLphp loads WordPress, which has WP Nati

== Changelog ==

= 1.2.7 (December 9, 2021) =
* Adds a `wp_saml_auth_pre_logout` action that fires before logout [[#274](https://github.com/pantheon-systems/wp-saml-auth/pull/274)].

= 1.2.6 (October 12, 2021) =
* Adds a `wp_saml_auth_login_parameters` filter to allow login parameters to be filtered [[#262](https://github.com/pantheon-systems/wp-saml-auth/pull/262)].

Expand Down
2 changes: 1 addition & 1 deletion wp-saml-auth.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Plugin Name: WP SAML Auth
* Version: 1.2.6
* Version: 1.2.7
* Description: SAML authentication for WordPress, using SimpleSAMLphp.
* Author: Pantheon
* Author URI: https://pantheon.io
Expand Down