Created by 
        Abram Hindle
        (abram.hindle@ualberta.ca) 
        and Hazel Campbell (hazel.campbell@ualberta.ca).
        Copyright 2014-2023.
      
    
401 Unauthorized & WWW-Authenticate: Basic header.Authorization: Basic headerfunction encodeBasic(username, password) {
    utf8bytes = new TextEncoder().encode(username + ":" + password);
    binaryString = String.fromCodePoint(...utf8bytes);
    return btoa(binaryString);
}
function decodeBasic(base64String) {
    binaryString = atob(base64String);
    utf8bytes = Uint8Array.from(binaryString, (c) => c.codePointAt(0));
    both = new TextDecoder().decode(utf8bytes);
    seperator = both.indexOf(':');
    return [both.slice(0,seperator), both.slice(seperator+1)];
}/stuff/private/index.html:/stuff/private/1 browser will assume is authenticated/stuff/private/folder/banana.html browser will assume is authenticated401 Unauthorized & WWW-Authenticate: Bearer header.Authorization: Bearer headerSet-Cookie and Cookie to transfer token
            Access-Control-Allow-Origin:  and friends.{
    "alg": "HS256",
    "typ": "JWT"
}{
    "sub": "user_id=1234567890",
    "custom": "whatever",
    "iat": 1698689742
} https://commandlinefanatic.com/cgi-bin/showarticle.cgi?article=art014 Joshua Davies, 2012
    https://commandlinefanatic.com/cgi-bin/showarticle.cgi?article=art014 Joshua Davies, 2012
 https://www.soapui.org/docs/oauth2/oauth2-overview/ Smartbear Software, 2023
    https://www.soapui.org/docs/oauth2/oauth2-overview/ Smartbear Software, 2023
 https://commons.wikimedia.org/wiki/File:Saml2-browser-sso-redirect-post.png Ayungn, 2021, Wikimedia Commons
    https://commons.wikimedia.org/wiki/File:Saml2-browser-sso-redirect-post.png Ayungn, 2021, Wikimedia Commons
Copyright 2014-2023 ⓒ Abram Hindle
Copyright 2019-2023 ⓒ Hazel Victoria Campbell and contributors
 
    Other images used under fair use and copyright their copyright holders.
Copyright (C) 2019-2023 Hazel Victoria Campbell
Copyright (C) 2014-2023 Abram Hindle and contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN.
01234567890123456789012345678901234567890123456789012345678901234567890123456789