bitweb / id-services
BitWeb extension for Estonian ID-Card and Mobile ID authentication and signing.
Installs: 5 905
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 17
Forks: 5
Open Issues: 3
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 plugin for Estonian Id Card and Mobile ID authentication and signing.
Requires PHP version 5.6 and up.
Usage:
Adding lib
php composer.phar require bitweb/id-services
# (When asked for a version, type `1.0.*`)
or add following to composer.json
"require": { "bitweb/id-services": "1.0.*" }
Integrating with apache
Add id-card folder into your public folder
The folder should contain index.php with following contents:
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);
In same folder should exist .htaccess:
SSLVerifyClient require
SSLVerifyDepth 3
Now your link in application should point to this index.php with query parameter redirectUrl.
Adding id card support into development environment
http://www.id.ee/public/Configuring_Apache_web_server_to_support_ID.pdf
Happy using