Open In App

HTTP headers | Authorization

Improve
Improve
Like Article
Like
Save
Share
Report

The HTTP headers Authorization header is a request type header that used to contains the credentials information to authenticate a user through a server. If the server responds with 401 Unauthorized and the WWW-Authenticate header not usually.

Syntax:

Authorization: <type> <credentials>

Directives: This header accept two directive as mentioned above and described below:

  • <type>: This directive holds the authentication type the default type is Basic and the other types are IANA registry of Authentication schemes and Authentication for AWS servers (AWS4-HMAC-SHA256).
  • <credentials>: This directive is totally depends on the type of authentication if the authentication is Basic then the credentials are struct with Username and Password combine with a colon like “Username:Password” and the resulted string is base64 encoded.

Example:

  • Authorization: Basic YWxhZGRpbjpvcGVuc2VzYW1l

Supported browsers: The browsers compatible with HTTP headers Authorization are listed below:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Safari
  • Opera

Last Updated : 11 May, 2020
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads