feat: add endpoints to list all authed external apps (#10944)

* feat: add endpoints to list all authed external apps

Listing the apps allows users to auth to external apps without going through the create workspace flow.
This commit is contained in:
Steven Masley
2023-12-05 14:03:44 -06:00
committed by GitHub
parent feaa9894a4
commit 81a3b36884
17 changed files with 565 additions and 10 deletions

75
coderd/apidoc/docs.go generated
View File

@ -748,6 +748,31 @@ const docTemplate = `{
}
}
},
"/external-auth": {
"get": {
"security": [
{
"CoderSessionToken": []
}
],
"produces": [
"application/json"
],
"tags": [
"Git"
],
"summary": "Get user external auths",
"operationId": "get-user-external-auths",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/codersdk.ExternalAuthLink"
}
}
}
}
},
"/external-auth/{externalauth}": {
"get": {
"security": [
@ -781,6 +806,33 @@ const docTemplate = `{
}
}
}
},
"delete": {
"security": [
{
"CoderSessionToken": []
}
],
"tags": [
"Git"
],
"summary": "Delete external auth user link by ID",
"operationId": "delete-external-auth-user-link-by-id",
"parameters": [
{
"type": "string",
"format": "string",
"description": "Git Provider ID",
"name": "externalauth",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/external-auth/{externalauth}/device": {
@ -8852,6 +8904,29 @@ const docTemplate = `{
}
}
},
"codersdk.ExternalAuthLink": {
"type": "object",
"properties": {
"created_at": {
"type": "string",
"format": "date-time"
},
"expires": {
"type": "string",
"format": "date-time"
},
"has_refresh_token": {
"type": "boolean"
},
"provider_id": {
"type": "string"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
},
"codersdk.ExternalAuthUser": {
"type": "object",
"properties": {