LightOpenID is configured by setting certain variables on an object, for example:
$openid = new LightOpenID;
$openid->identity = 'openid.example.com'
The following options are avaiable:
| name | description |
| identity | Sets (or gets) the identity supplied by an user. Set it before calling authUrl(), and get after validate(). |
| returnUrl | Users will be redirected to this url after they complete authentication with their provider. Default: current url. |
| realm | The realm user is signing into. Providers usually say "You are sgning into $realm". Must be in the same domain as returnUrl. Usually, this should be the host part of your site's url. And that's the default. |
| required and optional | Attempts to fetch more information about an user. See GettingMoreInformation. |
| verify_peer | When using https, attempts to verify peer's certificate. See CURLOPT_SSL_VERIFYPEER. |
| cainfo and capath | when verify_peer is true, sets the CA info file and directory, respecively. See CURLOPT_SSL_CAINFO and CURLOPT_SSL_CAPATH. |
It makes a difference if you choose 'http://www.martin-thoma.de' or 'http://martin-thoma.de' as realm. Which value should realm have, if I want to accept both?
Yeah, I have multiple domains, and would like to be able to get one identity for all of them.
As I don't know how to accpet both, I chose www.martin-thoma.de. To make sure that the user accesses the Website with the right URL, I added this line to my code on the page where the user logs in:
if($_SERVER['SERVER_NAME'] == 'martin-thoma.de'){header("Location: http://www.martin-thoma.de/terminplaner/Anmelden.php"); }You could also make that with .htaccess.
Hi,
I hav try create provider use this code. I have create tables in my sql db like in comment in example-mysql.php but when I call exmaple-mysql.php I don't see any result. Anybody help how to run own OpenID provider base on LightOpenID ?
My server (and clients) is on a private network and needs to connect via a proxy (squid) to get out to the providers. How can I do this? Ta.
some simple code (php) would help to how to keep the login between pages, how to get the login status after I click on some other subpage ? use own session after first login?
I think this has to be updated to
$openid = new LightOpenID('myhost');