Commit cf4f656b authored by pjcdawkins's avatar pjcdawkins

Issue #2488012: Provide the client name to the post authorize hook

parent 1079978e
......@@ -20,8 +20,10 @@
* The user account that has just been logged in.
* @param array $userinfo
* The user claims returned by the OpenID Connect provider.
* @param string $client_name
* The machine name of the OpenID Connect client plugin.
*/
function hook_openid_connect_post_authorize($tokens, $account, $userinfo) {
function hook_openid_connect_post_authorize($tokens, $account, $userinfo, $client_name) {
drupal_set_message('Welcome back!');
}
......
......@@ -802,7 +802,7 @@ function openid_connect_complete_authorization($client, $tokens, &$destination)
openid_connect_login_user($account, $destination);
module_invoke_all('openid_connect_post_authorize', $tokens, $account, $userinfo);
module_invoke_all('openid_connect_post_authorize', $tokens, $account, $userinfo, $client->getName());
return TRUE;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment