PeteGabriel / auth_with_golang

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Authentication tutorial


This tutorial makes use of Go features to implement HTTP Basic Authentication mechanism.

Basic Authentication

HTTP Basic Authentication is an authentication mechanism that makes use of the HTTP header Authorization. This header contains the user's username and password encoded with base-64 in the following way:

Authorization: Basic username:password

A concrete example for the credentials alice:pa55word would be:

Authorization: Basic YWxpY2U6cGE1NXdvcmQ=

By using an encoding mechanism the server can decode the header's content and validate the credentials.

About


Languages

Language:Go 100.0%