function getLocalID()
{
// Return the identifier that should be sent as the
// openid.identity_url parameter to the server.
if ($this->local_id === null && $this->canonicalID === null) {
return $this->claimed_id;
} else {
if ($this->local_id) {
return $this->local_id;
} else {
return $this->canonicalID;
}
}
}
function test_useCanonicalID() { $endpoint = new Auth_OpenID_ServiceEndpoint(); $endpoint->claimed_id = Auth_Yadis_XRI("=!1000"); $endpoint->canonicalID = Auth_Yadis_XRI("=!1000"); $htis->assertEquals($endpoint->getLocalID(), Auth_Yadis_XRI("=!1000")); }