Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
cse4707-secure-messaging/public/user.php
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
65 lines (61 sloc)
2.4 KB
This file contains 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 | |
defined('APP_DIR') or define('APP_DIR', __DIR__ . '/../app/'); | |
include_once(APP_DIR . 'model/User.php'); | |
include_once(APP_DIR . 'include/http.php'); | |
$data = User::authenticated(); | |
if (!$data) { | |
Http::redirect('index.php'); | |
} | |
include 'template/header.html'; | |
include 'template/user_menu_button.php'; | |
?> | |
<div class="row user-container"> | |
<div class="col s8 offset-s2"> | |
<h1> Welcome, <?php echo $data->username ?>! </h1> <br /> | |
<h5> Here's a bit of interesting information about this site... </h5> <br /> | |
<ul class="collapsible" data-collapsible="accordion"> | |
<li> | |
<div class="collapsible-header"> | |
<i class="material-icons">lock_outline</i> | |
User authentication | |
</div> | |
<div class="collapsible-body"> | |
<span> | |
Users are authenticated with this website using <a href="https://jwt.io/">JWT</a> | |
tokens which are generated server-side. Upon signing in, a user is given a unique | |
token containing non-sensitive user information which is stored client-side as a | |
browser cookie. | |
</span> | |
</div> | |
</li> | |
<li> | |
<div class="collapsible-header"> | |
<i class="material-icons">vpn_key</i> | |
Password hashing | |
</div> | |
<div class="collapsible-body"> | |
<span> | |
Passwords are salted and hashed server-side and stored in the | |
user database. Passwords are hashed using PHP's bcrypt algorithm. | |
</span> | |
</div> | |
</li> | |
<li> | |
<div class="collapsible-header"> | |
<i class="material-icons">https</i> | |
HTTPS support | |
</div> | |
<div class="collapsible-body"> | |
<span> | |
This website uses HTTPS (HTTP over SSL) to communicate between client | |
and server. All HTTP requests and responses are securely encrypted before | |
being sent. HTTPS makes use of public-key cryptography. | |
</span> | |
</div> | |
</li> | |
</ul> | |
</div> | |
</div> | |
<?php | |
include 'template/footer.html'; | |
?> |