Created
March 2, 2017 23:05
-
-
Save Gunni/45cc753d55901e327dcf350546467889 to your computer and use it in GitHub Desktop.
html/includes/authentication/client-cert.inc.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Observium | |
* | |
* This file is part of Observium. | |
* | |
* @package observium | |
* @subpackage authentication | |
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2016 Observium Limited | |
* | |
*/ | |
if (!$_SESSION['authenticated'] && !is_cli()) | |
{ | |
if ($_SERVER['SSL_CLIENT_VERIFY'] == 'SUCCESS') | |
{ | |
// Just getting here means authentication succeeded | |
$_SESSION['authenticated'] = TRUE; | |
$_SESSION['username'] = $_SERVER['SSL_CLIENT_S_DN_CN']; | |
} | |
} | |
// EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment