Basic Authentication for Web Pages


Basic Authentication is a simple and effective way to secure web pages. You can perform this easily by passing the authentication details directly via the URL. This article discusses how to perform basic authentication for web pages.


Passing Authentication Details via URL

We can use the below format for Basic Authentication:

Format:

[protocol]://[username]:[password]@hostname

This format will have the protocol (HTTP or HTTPS), username, and password.

For Example:

In the NLP, Navigate to test data, replace the test data with https://admin:admin123@orangehrm.com.

Basic Authentication

When we navigate to the host URL, the browser automatically sends the credentials for Authentication. We need to use HTTPS to secure sensitive information.