-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
44 lines (35 loc) · 1.2 KB
/
index.php
File metadata and controls
44 lines (35 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<!doctype html>
<html>
<head>
<title>Auth</title>
<link rel="stylesheet" href="css/bootstrap.min.css" type="text/css" />
<link rel="stylesheet" href="css/font-awesome.min.css" type="text/css" />
<link rel="stylesheet" href="css/style.css" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="js/jquery-2.1.1.min.js"></script>
</head>
<body>
<?php
require_once('PAuth/Autoload.php');
require_once('PAuth/function.lib.php');
// The first block of commented code registers a user. The second block performs a login. The third block checks a login
/*$oUser = new PAuth\User();
$oUser->username = 'phochs';
$oUser->email = 'email@example.com';
$oUser->name = 'My Name';
$oBCrypt = new PAuth\BCrypt();
$oUser->password = $oBCrypt->genPassword('testPass');
if(Settings::get('hashing.encryptSalt')) {
$oAES = new PAuth\AES();
$oUser->salt = $oAES->encrypt($oBCrypt->salt, 'testPass');
} else {
$oUser->salt = $oBCrypt->salt;
}
$oUser->saveUser();*/
$oAuth = new PAuth\Auth();
var_dump($oAuth->login('phochs', 'testPass'));
/*$oAuth = new PAuth\Auth();
var_dump($oAuth->checkLogin());*/
?>
</body>
</html>