When designing API authorization, or calling third-party APIs, you often come into contact with:
Authorization : Bearer Tokenxxxxxx
Do you have any doubts about why not just write it like this:
Authorization : Tokenxxxxxx
This is because of W3C's HTTP 1.0 specification, the format of Authorization is:
Authorization: <type> <authorization-parameters>
So Bearer is the type of authorization. Common types of authorization include:
- Basic for http-basic authentication;
- Bearer is commonly used in OAuth and JWT authorization;
- http-basic authentication with Digest MD5 hash (DEPRECATED)
- AWS4-HMAC-SHA256 AWS authorization
-...
Post comment 取消回复