DELAPARRA
Index
Color
NL
Category: HTTP headers

Authorization

Explained by Updated

What is Authorization?

Authorization: How the client identifies itself — usually a Bearer token, Basic credentials, or an API key. The Authorization header carries the client's credentials with an HTTP request. Common forms are Bearer followed by a token, Basic with an encoded username and password, or a custom scheme for API keys. The server reads it to decide who is making the request. If it is missing or invalid, the answer is usually 401 Unauthorized.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about Authorization

What should you keep in mind with Authorization?

Treat its contents as a password. Only send it over HTTPS, because anyone who sees the header can use the token. Keep it out of logs, error trackers and screenshots, and do not put tokens in URLs, where they end up in browser history and server logs. Give tokens a limited lifetime and the smallest set of permissions they need. If one leaks, you can then revoke it without affecting everything else.

What does an example of Authorization look like?

Authorization: Bearer eyJhbGciOiJIUzI1NiJ9...

At a glance

CategoryHTTP headers
Explained by
Updated

More HTTP headers terms

All terms starting with A

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.