Nenhuma descrição

Fabian Peter Hammerle 82e7d6164f adapt name of migration to create subject table 8 anos atrás
migrations 82e7d6164f adapt name of migration to create subject table 8 anos atrás
tests 82e7d6164f adapt name of migration to create subject table 8 anos atrás
.gitignore ab9451933e init dummy 8 anos atrás
.travis.yml 15e79ea2d3 phpunit: use executable in vendor/bin 8 anos atrás
Authenticator.php a4251c4324 Authenticator: added getClientCertSubjectDistinguishedName() 8 anos atrás
LICENSE ab9451933e init dummy 8 anos atrás
README.md 14b1cb0fe6 readme: added migration command 8 anos atrás
Subject.php b9a991c9fb Subject findByDistinguishedName(): added missing static keyword 8 anos atrás
composer.json ce6e8703d3 dependencies fixed: fphammerle/helpers is required in production 8 anos atrás
phpunit.xml ab9451933e init dummy 8 anos atrás

README.md

PHP version Build Status

yii2 extension for automatic login via TLS/SSL/HTTPS client certificates

Setup

1. Configure Webserver

apache

<VirtualHost example.hammerle.me:443>
    # ...

    SSLEngine on
    SSLCertificateFile /etc/somewhere/example-server-cert.pem
    SSLCertificateKeyFile /etc/restricted/example-server-key.pem

    SSLVerifyClient optional
    SSLVerifyDepth 1
    SSLCACertificateFile /etc/somewhere/example-client-cert-ca.pem
    SSLOptions +StdEnvVars
</VirtualHost>

2. Install Extension

composer require fphammerle/yii2-client-cert-auth

3. Create Table

./yii migrate --migrationPath=./vendor/fphammerle/yii2-client-cert-auth/migrations

4. Enable Extension in Yii's Application Config

$config = [
    // ...
    'bootstrap' => ['clientCertAuth'],
    'components' => [
        // ...
        'clientCertAuth' => \fphammerle\yii2\auth\clientcert\Authenticator::className(),
    ],
    // ...
];