mirror of
https://github.com/grafana/grafana.git
synced 2025-02-10 07:35:45 -06:00
Auth: Add docs for the SSO Settings get endpoint (#80240)
* add docs for sso-settings get endpoint * Update docs/sources/developers/http_api/sso-settings.md Co-authored-by: Misi <mgyongyosi@users.noreply.github.com> * Update docs/sources/developers/http_api/sso-settings.md Co-authored-by: Misi <mgyongyosi@users.noreply.github.com> --------- Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
This commit is contained in:
parent
d27e2fec88
commit
097f3c7e06
@ -24,6 +24,58 @@ title: SSO Settings API
|
||||
|
||||
The API can be used to create, update, delete, get, and list SSO Settings.
|
||||
|
||||
## Get SSO Settings
|
||||
|
||||
`GET /api/v1/sso-settings/:provider`
|
||||
|
||||
Gets the SSO Settings for a provider.
|
||||
|
||||
**Required permissions**
|
||||
|
||||
See note in the [introduction]({{< ref "#sso-settings" >}}) for an explanation.
|
||||
|
||||
| Action | Scope |
|
||||
| --------------- | ---------------------------- |
|
||||
| `settings:read` | `settings:auth.{provider}:*` |
|
||||
|
||||
**Example Request**:
|
||||
|
||||
```http
|
||||
GET /api/v1/sso-settings/github HTTP/1.1
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
```
|
||||
|
||||
**Example Response**:
|
||||
|
||||
```http
|
||||
HTTP/1.1 200
|
||||
Content-Type: application/json
|
||||
ETag: db87f729761898ee
|
||||
{
|
||||
"id": "1",
|
||||
"provider": "github",
|
||||
"settings": {
|
||||
"apiUrl": "https://api.github.com/user",
|
||||
"clientId": "my_github_client",
|
||||
"clientSecret": "*********",
|
||||
"enabled": true,
|
||||
"scopes": "user:email,read:org"
|
||||
// rest of the settings
|
||||
},
|
||||
"source": "system",
|
||||
}
|
||||
```
|
||||
|
||||
Status Codes:
|
||||
|
||||
- **200** – SSO Settings found
|
||||
- **400** – Bad Request
|
||||
- **401** – Unauthorized
|
||||
- **403** – Access Denied
|
||||
- **404** – SSO Settings not found
|
||||
|
||||
## Update SSO Settings
|
||||
|
||||
`PUT /api/v1/sso-settings/:provider`
|
||||
|
Loading…
Reference in New Issue
Block a user