diff --git a/inc/class-wp-saml-auth.php b/inc/class-wp-saml-auth.php index 5a33f9f..daa00b7 100644 --- a/inc/class-wp-saml-auth.php +++ b/inc/class-wp-saml-auth.php @@ -282,6 +282,14 @@ function() use ( $redirect_to ) { return new WP_Error( 'wp_saml_auth_invalid_provider', __( 'Invalid provider specified for SAML authentication', 'wp-saml-auth' ) ); } + /** + * Allows to modify attributes before the SAML authentication. + * + * @param array $attributes All attributes received from the SAML response. + * @param object $provider Provider instance currently in use. + */ + $attributes = apply_filters( 'wp_saml_auth_attributes', $attributes, $this->provider ); + /** * Runs before the SAML authentication dance proceeds *