Add simple authentication

This commit is contained in:
Joseph Haig
2016-05-29 16:38:43 +01:00
parent 926d7ba13b
commit 4e77adce33
5 changed files with 130 additions and 1 deletions

14
raspap.php Normal file
View File

@@ -0,0 +1,14 @@
<?php
$config = array(
'admin_user' => 'admin',
'admin_pass' => '$2y$10$YKIyWAmnQLtiJAy6QgHQ.eCpY4m.HCEbiHaTgN6.acNC6bDElzt.i'
);
if ( $auth_details = fopen(RASPI_CONFIG.'/raspap.auth', 'r') ) {
$config['admin_user'] = trim(fgets($auth_details));
$config['admin_pass'] = trim(fgets($auth_details));
fclose($auth_details);
}
?>