GitHost.io will be shut down on June 1, 2019. At that point this instance will be unreachable and all data will be irrevocably deleted. More details at https://about.gitlab.com/gitlab-hosted/#githost-is-shutting-down-on-june-1st-2019

Commit 0410462c authored by Evan Prodromou's avatar Evan Prodromou

add OpenID data to the Webfinger XRD file so you can login with it elsewhere

parent 86383ecb
......@@ -735,4 +735,29 @@ class OpenIDPlugin extends Plugin
return true;
}
/**
* Add link in user's XRD file to allow OpenID login.
*
* This link in the XRD should let users log in with their
* Webfinger identity to services that support it. See
* http://webfinger.org/login for an example.
*
* @param XRD &$xrd Currently-displaying XRD object
* @param User $user The user that it's for
*
* @return boolean hook value (always true)
*/
function onEndXrdActionLinks(&$xrd, $user)
{
$profile = $user->getProfile();
if (!empty($profile)) {
$xrd->links[] = array('rel' => 'http://specs.openid.net/auth/2.0/provider',
'href' => $profile->profileurl);
}
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