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?
5067_Labs/Requests/RequestsTrainer/templates/basicAuth_demo.html
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
40 lines (21 sloc)
919 Bytes
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
{% extends "base.html" %} | |
{% block navTabs %} | |
{% include "helpers/sessionNav.html" %} | |
{% endblock navTabs %} | |
{% block content %} | |
<h1>Basic Auth Demo</h1> | |
{% markdown %} | |
In this example we are using HTTP Basic auth. | |
Here the authentication details are sent as part of the HTTP request headers. | |
If you look at the request you will see: | |
``` | |
Authorization: Basic RXJlYnVzOkRhdmlu | |
``` | |
The String **Basic RXJlYnVzOkRhdmlu** passed in the header gives the authentication details. | |
**RXJlYnVzOkRhdmlu** is the username and pasword as a base64 encoded string. | |
### Resetting the Page | |
You can "Logout" of the basic auth using <a href="basiclogout" rel="noopener noreferrer" target="_blank"> this link</a>. | |
**IMPORTANT** The logout is a bit Janky, as Basic Auth doesn't really support it. | |
The page will put some invalid credentials in the Header, forcing you to re-authenticate. | |
{% endmarkdown %} | |
{% endblock %} |