BitWeb plugin for Estonian Id Card and Mobile ID authentication and signing.
Requires PHP version 5.6 and up.
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.*"
}
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);
SSLVerifyClient require
SSLVerifyDepth 3
http://www.id.ee/public/Configuring_Apache_web_server_to_support_ID.pdf
Happy using