DIY: Hands-on Base64

Get a brief introduction to Basic authentication methods with a code example.

Overview

We will demonstrate simple authentication using the Basic authenticationHTTP Basic Authentication (By default) requires the server to request a user name and password from the web client and verify them to a database of authorised users to ensure that they are legitimate. method in this lesson. Knowledge of Basic authentication is important for understanding other concepts, so we’ll spend some time looking under the hood to learn how the protocol works. We will not use the standardized methods available within Jakarta EE.

Basic authentication is a very simple technique that doesn’t require cookies, session identifiers, or login pages. It will not guarantee that the provided credentials can be trusted, since there is only a simple Base64 encoding of the provided username and password.

The following diagram shows the steps involved in authentication processing:

Get hands-on with 1200+ tech skills courses.