AuthenticationRequest Header

Authorization

Contains the client credentials used to authenticate a user agent with the server, most commonly holding JWT or OAuth access tokens.

Recommended Production Value
Essential (A+)
Bearer <token> OR Basic <base64-credentials>

Production Server Implementation

NGINX Configuration Snippet
proxy_set_header Authorization $http_authorization;

Directives & Syntax Breakdown

Bearer <token>

Standard OAuth 2.0 and JWT token authentication scheme.

Basic <base64>

HTTP Basic Auth scheme encoding "username:password" in Base64.

Common Security Hazards & Pitfalls

  • β€’Never send Authorization headers over plain HTTP connections, as credentials can be intercepted in plaintext.
Frequently Asked Questions

Authorization - Questions & Answers

Common implementation questions, browser enforcement rules, and debugging.

Use req.headers.authorization?.split(" ")[1] to isolate the token string from the "Bearer " prefix.