HTTP protocol Basic Authentication authorization

Source: Internet
Author: User

The HTTP protocol is stateless and can be identified by a cookie between the browser and the Web server. How are desktop applications (such as the Sina Desktop client, SkyDrive client) and the Web server identified?

what is HTTP Basic authentication

Desktop applications also interact with the Web server via the HTTP protocol, and desktop applications generally do not use cookies, but instead place the "username + colon + password" in the header of the HTTP request with a BASE64 encoded string Authorization sent to the server, this way is called HTTP Basic authentication (Basic authentication).

the process of basic certification of TTP

The first step: The client sends an HTTP request to the server.

Step two: Because the request does not contain the authorization header, the server returns a 401 unauthozied to the client and adds information to the response header "Www-authenticate".

The third step: the client to the user name and password with BASE64 encoding, placed in the authorization header sent to the server, authentication success.

The fourth step: the server will authorization the header of the user name password out, to verify, if the authentication passes, according to the request, will send resources to the client.

Note: The HTTP protocol is stateless and requires authentication for each request from the same client to the server

HTTP Basic authentication and HTTPS

The "User name + colon + password" with BASE64 encoded string although the naked eye can not be seen, but the program is easy to decrypt. So HTTP request on the network, if the use of HTTP transmission is very insecure. Generally will be used HTTPS transmission, HTTPS is encrypted, so it is more secure.

OAuth for HTTP, the authorization header is not the user name password, but a token.

HTTP protocol Basic Authentication authorization

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.