From 69a431793f976d0d7ebdd3999facfac6a0e27646 Mon Sep 17 00:00:00 2001 From: Robbie Paul Date: Mon, 24 Apr 2017 16:13:07 +0100 Subject: [PATCH] Authentication URL can be modified Some OpenID Connect providers offer additional functionality by adding query params to the authentication URL For example with Azure Active Directory if you pass in `&domain_hint=REALM` you can customise the way the login screen looks with your corporate logo etc --- includes/openid-connect-generic-client.php | 2 +- openid-connect-generic.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/openid-connect-generic-client.php b/includes/openid-connect-generic-client.php index 4f306a1..91ae1a2 100644 --- a/includes/openid-connect-generic-client.php +++ b/includes/openid-connect-generic-client.php @@ -50,7 +50,7 @@ class OpenID_Connect_Generic_Client { urlencode( $this->redirect_uri ) ); - return $url; + return apply_filters( 'openid-connect-generic-auth-url', $url ); } /** diff --git a/openid-connect-generic.php b/openid-connect-generic.php index 84ea43f..0b11eb0 100644 --- a/openid-connect-generic.php +++ b/openid-connect-generic.php @@ -19,6 +19,7 @@ Notes - openid-connect-generic-login-button-text - modify the login button text - openid-connect-generic-user-login-test - (bool) should the user be logged in based on their claim - openid-connect-generic-user-creation-test - (bool) should the user be created based on their claim + - openid-connect-generic-auth-url - modify the authentication url Actions - openid-connect-generic-user-create - 2 args: fires when a new user is created by this plugin