basic-authentication tagged requests and articles

Categorized request examples and articles tagged with [basic-authentication] keyword
How do I send Basic Auth Credentials with Curl?
To send basic auth credentials with Curl, use the "-u login: password" command-line option. Curl automatically converts the login: password pair into a Base64-encoded string and adds the "Authorization: Basic [token]" header to the request. In this Curl request with Basic Auth Credentials example, we send a request with basic authorization credentials to the ReqBin echo URL. Click Run to execute the Curl Basic Authentication Credentials Example online and see the results.

How do I POST JSON string with Basic Authentication?
To post JSON to a server with Basic Authentication credentials, you need to make an HTTP POST or PUT request, include the JSON in the body of the HTTP message, and pass the "Authorization: Basic [token]" HTTP header to the server. The [token] is a Base64 encoded string of user credentials in the form of a login:password string. In this POST JSON with a Basic Authentication Credentials Example, we send a POST request with JSON body and "Authorization: Basic [token]" header to the ReqBin echo URL. Click Send to execute POST JSON with Basic Authentication example online and see the results.

Howto make POST request with basic authentication credentials using Curl?
To send a POST request with basic authentication credentials with Curl, you need to use the --user "login: password" command-line option. The user's credentials are automatically converted by Curl to a Base64 encoded string and passed to the server with an Authorization: Basic [token] header. POST data is passed to Curl with the -d option. In this Curl POST with Basic Authentication header example, we sent a request to the ReqBin echo URL with sample POST data. Click Run to execute the Curl POST Basic Auth example online and see the result.

How do I send GET request with Basic Server Authentication?
To send a GET request to the server with Basic Authentication credentials, you must pass the "Authorization: Basic {credentials}" HTTP header to the server with the user's credentials encoded in a Base64 string in the login:password format. An Authorization HTTP header must be sent with every request for a protected resource. In this Basic Server Authentication example, we send a GET request to the ReqBin echo URL with user credentials. Click Send to execute GET Request with the Basic Server Authentication credentials online and see the results.

How do I use curl -u option?
The curl -u (or --- user) command sends the user's basic authentication data to the server. The user's credentials must be provided directly after the -u command line switch. The curl -u command is used to authorize a user using the HTTP basic authentication scheme that is built into the HTTP protocol. Curl converts the provided user authentication data into a standard Authorization: Basic {base64string} HTTP header and sends it to the server along with the other data in your request. In this Curl -u example, we send a request with user credentials to the ReqBin echo URL. Click Run to execute the Curl Basic Authentication example online and see the results.

HTTP Authentication
HTTP provides a framework for controlling access to pages and API resources by defining several authentication schemes and implementing them.

Basic Authentication Method
Basic access authentication method is used by client to provide a user name and password when making a request