# OIDC endpoints (Admin API)

> 4 FeatherPanel Admin API endpoints from admin/oidc.php: methods, paths, auth, permissions, rate limits, parameters and responses.

Source: https://featherpanel.com/docs/api/reference/admin/oidc/

Defined in [`backend/app/routes/admin/oidc.php`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/oidc.php). Authentication used here: **Admin**. Read [Authentication](https://featherpanel.com/docs/api/authentication/) for how to send credentials and [Rate limits and errors](https://featherpanel.com/docs/api/rate-limits-and-errors/) for the response envelope.

Paths, methods, permissions and rate limits come from the route file. Summaries, parameters and response codes come from the OpenAPI annotations on the controllers; endpoints without annotations show only what the route file declares.

## Endpoints

### GET `/api/admin/oidc/providers`

- Auth: Admin
- Permission: `admin.settings.view`
- Route name: `admin-oidc-providers`
- Controller: [`OidcProvidersController::index`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/OidcProvidersController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/oidc.php#L26)

**List OIDC providers**

| Response `data` field | Type | Description |
| --- | --- | --- |
| `providers` | OidcProvider\[\] |  |

```bash
curl -X GET "$PANEL_URL/api/admin/oidc/providers" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Responses: `200` Providers retrieved successfully

### PUT `/api/admin/oidc/providers`

- Auth: Admin
- Permission: `admin.settings.edit`
- Route name: `admin-oidc-providers-create`
- Controller: [`OidcProvidersController::create`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/OidcProvidersController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/oidc.php#L36)

**Create OIDC provider**

Request body: [`OidcProvider`](https://featherpanel.com/docs/api/schemas/#schema-oidcprovider) (application/json)

| Body field | Type | Required | Description |
| --- | --- | --- | --- |
| `uuid` | string (uuid) | no | Provider UUID |
| `name` | string | no | Display name |
| `issuer_url` | string | no | OIDC issuer URL |
| `client_id` | string | no | OIDC client ID |
| `scopes` | string | no | Space-separated scopes |
| `email_claim` | string | no | Email claim name |
| `subject_claim` | string | no | Subject claim name |
| `group_claim` | string | no | Group/role claim name |
| `group_value` | string | no | Required group/role value |
| `auto_provision` | string | no | Auto provision users |
| `require_email_verified` | string | no | Require email\_verified |
| `enabled` | string | no | Whether this provider is enabled |

```bash
curl -X PUT "$PANEL_URL/api/admin/oidc/providers" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"uuid":"","name":"","issuer_url":"","client_id":"","scopes":"","email_claim":"","subject_claim":"","group_claim":"","group_value":"","auto_provision":"","require_email_verified":"","enabled":""}'
```

Plugin events: [`featherpanel:oidc:provider:create`](https://featherpanel.com/docs/plugins/events/oidc-providers/#oidc-provider-created)

Responses: `200` Provider created successfully · `400` Bad request

### PATCH `/api/admin/oidc/providers/{uuid}`

- Auth: Admin
- Permission: `admin.settings.edit`
- Route name: `admin-oidc-providers-update`
- Controller: [`OidcProvidersController::update`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/OidcProvidersController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/oidc.php#L47)

**Update OIDC provider**

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `uuid` | path | string | yes |  |

Request body: [`OidcProvider`](https://featherpanel.com/docs/api/schemas/#schema-oidcprovider) (application/json)

| Body field | Type | Required | Description |
| --- | --- | --- | --- |
| `uuid` | string (uuid) | no | Provider UUID |
| `name` | string | no | Display name |
| `issuer_url` | string | no | OIDC issuer URL |
| `client_id` | string | no | OIDC client ID |
| `scopes` | string | no | Space-separated scopes |
| `email_claim` | string | no | Email claim name |
| `subject_claim` | string | no | Subject claim name |
| `group_claim` | string | no | Group/role claim name |
| `group_value` | string | no | Required group/role value |
| `auto_provision` | string | no | Auto provision users |
| `require_email_verified` | string | no | Require email\_verified |
| `enabled` | string | no | Whether this provider is enabled |

```bash
curl -X PATCH "$PANEL_URL/api/admin/oidc/providers/$UUID" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"uuid":"","name":"","issuer_url":"","client_id":"","scopes":"","email_claim":"","subject_claim":"","group_claim":"","group_value":"","auto_provision":"","require_email_verified":"","enabled":""}'
```

Plugin events: [`featherpanel:oidc:provider:update`](https://featherpanel.com/docs/plugins/events/oidc-providers/#oidc-provider-updated)

Responses: `200` Provider updated successfully · `404` Provider not found

### DELETE `/api/admin/oidc/providers/{uuid}`

- Auth: Admin
- Permission: `admin.settings.edit`
- Route name: `admin-oidc-providers-delete`
- Controller: [`OidcProvidersController::delete`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/OidcProvidersController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/oidc.php#L63)

**Delete OIDC provider**

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `uuid` | path | string | yes |  |

```bash
curl -X DELETE "$PANEL_URL/api/admin/oidc/providers/$UUID" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Plugin events: [`featherpanel:oidc:provider:delete`](https://featherpanel.com/docs/plugins/events/oidc-providers/#oidc-provider-deleted)

Responses: `200` Provider deleted successfully · `404` Provider not found
