Bearer authentication uses a token that can be presented for authorization without proving possession of a separate key. In an API request, place the token after the Bearer keyword in the Authorization header: Authorization: Bearer <token>. section 8.1
OpenAPI describes this mechanism as an HTTP security scheme. A JWT bearer definition identifies the scheme as Bearer and records JWT as its format; the scheme can protect the whole API or selected operations. section 8.1
JWT bearer scheme
components: securitySchemes: JWTBearer: description: Bearer JSON Web Token type: http scheme: Bearer bearerFormat: JWT section 8.1
Figure 8.1 We define the security schemes that protect our API in the specification’s components section under securitySchemes, and we apply them globally to the API under the specification’s security field or per operation using the operation’s security field.
Use the figure to compare global authentication settings with per-operation overrides, such as leaving one endpoint public while protecting another. section 8.1




