NOTICE
This project is forked from github.com/iignatov/LightOpenID. Extending for Ntpc OpenID service and add some settings. It must run with openid.php together.
Lightweight PHP5 library for easy OpenID authentication.
Version....:
1.3.1 ⏬ ( see the change log for details )Released on:
March 04, 2016Source code:
Official GitHub RepoHomepage...:
http://code.google.com/p/lightopenid/Author.....:
Mewp
NtpcOpenID library for easy Ntpc OpenID Authentication and Auhtorization.
Version....:
1.3.2Source code:
Official GitHub RepoAuthor.....:
Tiebob
-
Authentication with the provider:
$openid = new NtpcOpenID('my-host.example.org'); $openid->identity = "https://openid.ntpc.edu.tw"; header('Location: ' . $openid->authUrl());
-
Verification:
$openid = new NtpcOpenID('my-host.example.org'); if ($openid->mode) { echo $openid->validate() ? 'Logged in.' : 'Failed!'; }
Without setting $openid->required
values, it has default values. If full values needed, use $openid->setRequired(1)
. For example:
$openid = new NtpcOpenID('my-host.example.org');
$openid->identity = "https://openid.ntpc.edu.tw";
header('Location: ' . $openid->authUrl());
$openid = new NtpcOpenID('my-host.example.org');
$openid->setRequired(1);
header('Location: ' . $openid->authUrl());
After verify correct. To get the values use:
$openid->getNtpcData();
This library requires PHP >= 5.6 with cURL or HTTP/HTTPS stream wrappers enabled.
- Supports Ntpc OpenID
- Works with PHP >= 5.6
- JavaScript OpenID Selector - simple user interface that can be used with LightOpenID.
- HybridAuth - easy to install and use social sign on PHP library, which uses LightOpenID.
- OpenID Dev Specifications - documentation for the OpenID extensions and related topics.
LightOpenID is an open source software available under the MIT License.