# Custom Security Schemes
Source: https://speakeasy.com/docs/sdks/customize/authentication/custom-security-schemes

import { CodeWithTabs, Callout, Table } from "@/mdx/components";



Custom Security Schemes define a JSON Schema for SDK security options. Combined with [SDK Hooks](/docs/customize/code/sdk-hooks), custom authentication and authorization schemes can be implemented beyond OpenAPI's capabilities.

<Callout title="Availability" type="info">
  Custom Security Schemes are only available for [Business and Enterprise users](/pricing).

</Callout>

### Language support

<Table
  data={[
    {
      typescript: "✅",
      python: "✅",
      go: "✅",
      csharp: "🏗️",
      java: "✅",
      php: "🏗️",
      ruby: "🏗️",
    },
  ]}
  columns={[
    { key: "typescript", header: "TypeScript" },
    { key: "python", header: "Python" },
    { key: "go", header: "Go" },
    { key: "csharp", header: "C#" },
    { key: "java", header: "Java" },
    { key: "php", header: "PHP" },
    { key: "ruby", header: "Ruby" },
  ]}
/>

### Define a custom security scheme

Define the custom security scheme under `components -> securitySchemes` and reference it in the `security` section. Set the `type` to `http` and the `scheme` to `custom`. Use the `x-speakeasy-custom-security-scheme` extension to specify a JSON Schema. This schema must include at least one property and can accommodate multiple properties with different schema definitions.

```yaml
openapi: 3.1.0
info:
  title: Custom Security Scheme Example
  version: 1.0.0
security:
  - myCustomScheme: [] # reference to the custom security scheme defined below