# Security and authentication

## Authentication overview

Speakeasy-created SDKs have authentication automatically configured based on the `securitySchemes` defined in the [OpenAPI specification](/content/openapi/security/index.html).

APIs authenticated with simple schemes, such as Basic HTTP auth, API keys, and bearer tokens, work out of the box. For APIs using short-lived tokens (OAuth), additional configuration is required to simplify setup.

### Authentication Mechanism

#### HTTP Basic authentication

**Language Support**  
✅ [Docs](/content/docs/customize/authentication/simple-schemes#basic-http-authentication/index.html)

#### API key [header, query]

**Language Support**  
✅ [Docs](/content/docs/customize/authentication/simple-schemes#api-key-authentication/index.html)

#### Bearer Token authentication

**Language Support**  
✅ [Docs](/content/docs/customize/authentication/configuration/index.html)

#### OAuth

**Language Support**  
✅ [All GA and some beta languages](/content/docs/customize/authentication/oauth/index.html)

#### mTLS

**Language Support**  
✅ [Using hooks](/content/docs/customize/code/sdk-hooks/index.html)

#### Custom security schemes

**Language Support**  
✅ [Using Speakeasy custom security schemes extension](/content/docs/customize/authentication/custom-security-schemes/index.html)

| Authentication Mechanism                  | Language Support                                              |
|------------------------------------------|-------------------------------------------------------------|
| HTTP Basic authentication                 | ✅ [Docs](/content/docs/customize/authentication/simple-schemes#basic-http-authentication/index.html) |
| API key [header, query]                 | ✅ [Docs](/content/docs/customize/authentication/simple-schemes#api-key-authentication/index.html) |
| Bearer Token authentication               | ✅ [Docs](/content/docs/customize/authentication/configuration/index.html) |
| OAuth                                     | ✅ [All GA and some beta languages](/content/docs/customize/authentication/oauth/index.html) |
| mTLS                                      | ✅ [Using hooks](/content/docs/customize/code/sdk-hooks/index.html) |
| Custom security schemes                   | ✅ [Using Speakeasy custom security schemes extension](/content/docs/customize/authentication/custom-security-schemes/index.html) |

Last updated on April 24, 2026
