bitweb / id-services
BitWeb扩展,用于爱沙尼亚ID卡和移动ID认证和签名。
2.1.0
2019-01-21 07:51 UTC
Requires
- php: >=5.6
- zendframework/zend-hydrator: ~2.2
- zendframework/zend-log: ~2.3
- zendframework/zend-soap: ~2.3
- zendframework/zend-stdlib: ~3.0
Requires (Dev)
- phpunit/phpunit: 3.7.*
- satooshi/php-coveralls: dev-master
- sebastianbergmann/phpcov: 1.1.0
README
BitWeb插件,用于爱沙尼亚ID卡和移动ID认证及签名。
需要PHP版本5.6及以上。
使用方法
添加库
php composer.phar require bitweb/id-services
# (When asked for a version, type `1.0.*`)
或者将以下内容添加到composer.json中
"require": { "bitweb/id-services": "1.0.*" }
与Apache集成
将id-card文件夹添加到您的公共文件夹中
该文件夹应包含index.php,其内容如下
use BitWeb\IdServices\Authentication\IdCard\Authentication; // make everything relative to the project root chdir(dirname(dirname(__DIR__))); // Autoload classes include 'vendor/autoload.php'; include 'init_autoloader.php'; Zend\Mvc\Application::init(require 'config/application.config.php'); $redirectUrl = urldecode($_GET["redirectUrl"]); if (!Authentication::isSuccessful()) { $redirectUrl = '/id-card/no-card-found'; } else { Authentication::login(); } $headerString = 'Location: ' . $redirectUrl; header($headerString);
在同一文件夹中应存在 .htaccess
SSLVerifyClient require
SSLVerifyDepth 3
现在您的应用程序中的链接应指向此index.php,并带有查询参数redirectUrl。
将ID卡支持添加到开发环境
http://www.id.ee/public/Configuring_Apache_web_server_to_support_ID.pdf
祝您使用愉快