From 930efc3824bf05d94ddb5dcaf03933ffe723374e Mon Sep 17 00:00:00 2001 From: Mihai Doarna Date: Wed, 10 Jan 2024 16:03:03 +0200 Subject: [PATCH] Auth: Add docs for the SSO Settings update endpoint (#79980) add docs for sso settings update endpoint --- .../developers/http_api/sso-settings.md | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/docs/sources/developers/http_api/sso-settings.md b/docs/sources/developers/http_api/sso-settings.md index 25d337104a8..8395ba44353 100644 --- a/docs/sources/developers/http_api/sso-settings.md +++ b/docs/sources/developers/http_api/sso-settings.md @@ -24,6 +24,53 @@ title: SSO Settings API The API can be used to create, update, delete, get, and list SSO Settings. +## Update SSO Settings + +`PUT /api/v1/sso-settings/:provider` + +Updates the SSO Settings for a provider. + +**Required permissions** + +See note in the [introduction]({{< ref "#sso-settings" >}}) for an explanation. + +| Action | Scope | +| ---------------- | ---------------------------- | +| `settings:write` | `settings:auth.{provider}:*` | + +**Example Request**: + +```http +PUT /api/v1/sso-settings/github HTTP/1.1 +Accept: application/json +Content-Type: application/json +Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk + +{ + "settings": { + "apiUrl": "https://api.github.com/user", + "clientId": "my_github_client", + "clientSecret": "my_github_secret", + "enabled": true, + "scopes": "user:email,read:org" + } +} +``` + +**Example Response**: + +```http +HTTP/1.1 204 +Content-Type: application/json +``` + +Status Codes: + +- **204** – SSO Settings updated +- **400** – Bad Request +- **401** – Unauthorized +- **403** – Access Denied + ## Delete SSO Settings `DELETE /api/v1/sso-settings/:provider`