# Bearer Token Authentication

Type: `middleware.http.bearer`

Status: stable

Reference: https://docs.dapr.io/reference/components-reference/supported-middleware/middleware-bearer/

## Example

```
apiVersion: cra.diagrid.io/v1beta1
kind: Component
metadata:
  name: <name>
spec:
  type: middleware.http.bearer
  version: v1
  metadata:
    # The expected audience of the JWT tokens
    - name: audience
      value: "my-app"
    # The expected issuer of the JWT tokens
    - name: issuer
      value: "https://accounts.google.com"
    # The URL of the JSON Web Key Set (JWKS) endpoint
    - name: jwksURL
      value: "https://accounts.google.com/.well-known/jwks.json"

```

## Metadata

### `audience` (string)

**Required** - The expected audience of the JWT tokens

Example value: `my-app`

### `issuer` (string)

**Required** - The expected issuer of the JWT tokens

Example value: `https://accounts.google.com`

### `jwksURL` (string)

**Required** - The URL of the JSON Web Key Set (JWKS) endpoint

Example value: `https://accounts.google.com/.well-known/jwks.json`
