Skip to content

Latest commit

 

History

History
40 lines (23 loc) · 1.56 KB

File metadata and controls

40 lines (23 loc) · 1.56 KB

HTTP authentication and authorization

Table of contents

HTTP authentication

Authentication is the process of verifying the identity of a client making a request to an API.

In HTTP APIs, a common authentication mechanism is an API key.

The API key is sent in the Authorization header of every request:

Authorization: Bearer <api-key>

The server rejects requests with a missing or invalid key with 401 Unauthorized.

Docs:

HTTP authorization

Authorization is the process of determining whether an authenticated client has permission to access a specific endpoint or resource.

A client can be authenticated but still lack permission for certain resources.

Common HTTP status codes related to auth:

Docs: