feat: allow creating manual oidc/github based users (#9000)

* feat: allow creating manual oidc/github based users
* Add unit test for oidc and no login type create
This commit is contained in:
Steven Masley
2023-08-10 20:04:35 -05:00
committed by GitHub
parent 6fd5344d0a
commit 40f3fc3a1c
21 changed files with 356 additions and 94 deletions
+11 -1
View File
@@ -7536,13 +7536,21 @@ const docTemplate = `{
],
"properties": {
"disable_login": {
"description": "DisableLogin sets the user's login type to 'none'. This prevents the user\nfrom being able to use a password or any other authentication method to login.",
"description": "DisableLogin sets the user's login type to 'none'. This prevents the user\nfrom being able to use a password or any other authentication method to login.\nDeprecated: Set UserLoginType=LoginTypeDisabled instead.",
"type": "boolean"
},
"email": {
"type": "string",
"format": "email"
},
"login_type": {
"description": "UserLoginType defaults to LoginTypePassword.",
"allOf": [
{
"$ref": "#/definitions/codersdk.LoginType"
}
]
},
"organization_id": {
"type": "string",
"format": "uuid"
@@ -8449,6 +8457,7 @@ const docTemplate = `{
"codersdk.LoginType": {
"type": "string",
"enum": [
"",
"password",
"github",
"oidc",
@@ -8456,6 +8465,7 @@ const docTemplate = `{
"none"
],
"x-enum-varnames": [
"LoginTypeUnknown",
"LoginTypePassword",
"LoginTypeGithub",
"LoginTypeOIDC",
+11 -2
View File
@@ -6715,13 +6715,21 @@
"required": ["email", "username"],
"properties": {
"disable_login": {
"description": "DisableLogin sets the user's login type to 'none'. This prevents the user\nfrom being able to use a password or any other authentication method to login.",
"description": "DisableLogin sets the user's login type to 'none'. This prevents the user\nfrom being able to use a password or any other authentication method to login.\nDeprecated: Set UserLoginType=LoginTypeDisabled instead.",
"type": "boolean"
},
"email": {
"type": "string",
"format": "email"
},
"login_type": {
"description": "UserLoginType defaults to LoginTypePassword.",
"allOf": [
{
"$ref": "#/definitions/codersdk.LoginType"
}
]
},
"organization_id": {
"type": "string",
"format": "uuid"
@@ -7576,8 +7584,9 @@
},
"codersdk.LoginType": {
"type": "string",
"enum": ["password", "github", "oidc", "token", "none"],
"enum": ["", "password", "github", "oidc", "token", "none"],
"x-enum-varnames": [
"LoginTypeUnknown",
"LoginTypePassword",
"LoginTypeGithub",
"LoginTypeOIDC",