select_id = false; } } function setup($identity, $realm, $assoc_handle, $attributes) { header('WWW-Authenticate: Basic realm="' . $this->data['openid_realm'] . '"'); header('HTTP/1.0 401 Unauthorized'); } function checkid($realm, &$attributes) { if(!isset($_SERVER['PHP_AUTH_USER'])) { return false; } if ($_SERVER['PHP_AUTH_USER'] == $this->login && $_SERVER['PHP_AUTH_PW'] == $this->password ) { # Returning identity # It can be any url that leads here, or to any other place that hosts # an XRDS document pointing here. return $this->serverLocation . '?id=' . $this->login; } return false; } } $op = new BasicProvider; $op->login = 'test'; $op->password = 'test'; $op->server();