Skip to content

Commit 6947021

Browse files
committed
golden file update
1 parent cf19d8c commit 6947021

File tree

5 files changed

+245
-0
lines changed

5 files changed

+245
-0
lines changed

cli/testdata/server-config.yaml.golden

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ networking:
3333
# directly in the database.
3434
# (default: <unset>, type: bool)
3535
disablePasswordAuth: false
36+
# If enabled, users can switch from password based authentication to oauth based
37+
# authentication by logging into an oidc account with the same email address.
38+
# (default: <unset>, type: bool)
39+
enableOauthAuthConversion: false
3640
# The interval in which coderd should be checking the status of workspace proxies.
3741
# (default: 1m0s, type: duration)
3842
proxyHealthInterval: 1m0s

coderd/apidoc/docs.go

Lines changed: 81 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/apidoc/swagger.json

Lines changed: 71 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/api/authorization.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,57 @@ curl -X POST http://coder-server:8080/api/v2/authcheck \
6666

6767
To perform this operation, you must be authenticated. [Learn more](authentication.md).
6868

69+
## Convert user from password to oauth authentication
70+
71+
### Code samples
72+
73+
```shell
74+
# Example request using curl
75+
curl -X POST http://coder-server:8080/api/v2/users/convert-login \
76+
-H 'Content-Type: application/json' \
77+
-H 'Accept: application/json' \
78+
-H 'Coder-Session-Token: API_KEY'
79+
```
80+
81+
`POST /users/convert-login`
82+
83+
> Body parameter
84+
85+
```json
86+
{
87+
"email": "user@example.com",
88+
"password": "string",
89+
"to_login_type": "password"
90+
}
91+
```
92+
93+
### Parameters
94+
95+
| Name | In | Type | Required | Description |
96+
| ------ | ---- | ---------------------------------------------------------------------- | -------- | --------------- |
97+
| `body` | body | [codersdk.ConvertLoginRequest](schemas.md#codersdkconvertloginrequest) | true | Convert request |
98+
99+
### Example responses
100+
101+
> 201 Response
102+
103+
```json
104+
{
105+
"expires_at": "string",
106+
"state_string": "string",
107+
"to_login_type": "password",
108+
"user_id": "string"
109+
}
110+
```
111+
112+
### Responses
113+
114+
| Status | Meaning | Description | Schema |
115+
| ------ | ------------------------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |
116+
| 201 | [Created](https://tools.ietf.org/html/rfc7231#section-6.3.2) | Created | [codersdk.OauthConversionResponse](schemas.md#codersdkoauthconversionresponse) |
117+
118+
To perform this operation, you must be authenticated. [Learn more](authentication.md).
119+
69120
## Log in user
70121

71122
### Code samples

docs/api/schemas.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1270,6 +1270,24 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
12701270
| `autostart` |
12711271
| `autostop` |
12721272

1273+
## codersdk.ConvertLoginRequest
1274+
1275+
```json
1276+
{
1277+
"email": "user@example.com",
1278+
"password": "string",
1279+
"to_login_type": "password"
1280+
}
1281+
```
1282+
1283+
### Properties
1284+
1285+
| Name | Type | Required | Restrictions | Description |
1286+
| --------------- | ---------------------------------------- | -------- | ------------ | ---------------------------------------------- |
1287+
| `email` | string | true | | |
1288+
| `password` | string | true | | |
1289+
| `to_login_type` | [codersdk.LoginType](#codersdklogintype) | true | | To login type is the login type to convert to. |
1290+
12731291
## codersdk.CreateFirstUserRequest
12741292

12751293
```json
@@ -2992,6 +3010,26 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
29923010
| `sign_in_text` | string | false | | |
29933011
| `username_field` | string | false | | |
29943012

3013+
## codersdk.OauthConversionResponse
3014+
3015+
```json
3016+
{
3017+
"expires_at": "string",
3018+
"state_string": "string",
3019+
"to_login_type": "password",
3020+
"user_id": "string"
3021+
}
3022+
```
3023+
3024+
### Properties
3025+
3026+
| Name | Type | Required | Restrictions | Description |
3027+
| --------------- | ---------------------------------------- | -------- | ------------ | ----------- |
3028+
| `expires_at` | string | false | | |
3029+
| `state_string` | string | false | | |
3030+
| `to_login_type` | [codersdk.LoginType](#codersdklogintype) | false | | |
3031+
| `user_id` | string | false | | |
3032+
29953033
## codersdk.Organization
29963034

29973035
```json

0 commit comments

Comments
 (0)