mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
feat: add external-auth
cli (#10052)
* feat: add `external-auth` cli * Add subcommands * Improve descriptions * Add external-auth subcommand * Fix docs * Fix gen * Fix comment * Fix golden file
This commit is contained in:
76
coderd/apidoc/docs.go
generated
76
coderd/apidoc/docs.go
generated
@ -4561,7 +4561,7 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/workspaceagents/me/gitauth": {
|
||||
"/workspaceagents/me/external-auth": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
@ -4574,14 +4574,20 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Agents"
|
||||
],
|
||||
"summary": "Get workspace agent Git auth",
|
||||
"operationId": "get-workspace-agent-git-auth",
|
||||
"summary": "Get workspace agent external auth",
|
||||
"operationId": "get-workspace-agent-external-auth",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"format": "uri",
|
||||
"description": "Git URL",
|
||||
"name": "url",
|
||||
"description": "Match",
|
||||
"name": "match",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Provider ID",
|
||||
"name": "id",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
@ -4596,7 +4602,54 @@ const docTemplate = `{
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/agentsdk.GitAuthResponse"
|
||||
"$ref": "#/definitions/agentsdk.ExternalAuthResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/workspaceagents/me/gitauth": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"CoderSessionToken": []
|
||||
}
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Agents"
|
||||
],
|
||||
"summary": "Removed: Get workspace agent git auth",
|
||||
"operationId": "removed-get-workspace-agent-git-auth",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Match",
|
||||
"name": "match",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Provider ID",
|
||||
"name": "id",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"description": "Wait for a new token to be issued",
|
||||
"name": "listen",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/agentsdk.ExternalAuthResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -6417,16 +6470,23 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"agentsdk.GitAuthResponse": {
|
||||
"agentsdk.ExternalAuthResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"access_token": {
|
||||
"type": "string"
|
||||
},
|
||||
"password": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
},
|
||||
"url": {
|
||||
"type": "string"
|
||||
},
|
||||
"username": {
|
||||
"description": "Deprecated: Only supported on ` + "`" + `/workspaceagents/me/gitauth` + "`" + `\nfor backwards compatibility.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user