mirror of
https://github.com/coder/coder.git
synced 2025-07-21 01:28:49 +00:00
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:
@ -78,9 +78,12 @@ type CreateFirstUserResponse struct {
|
||||
type CreateUserRequest struct {
|
||||
Email string `json:"email" validate:"required,email" format:"email"`
|
||||
Username string `json:"username" validate:"required,username"`
|
||||
Password string `json:"password" validate:"required_if=DisableLogin false"`
|
||||
Password string `json:"password"`
|
||||
// UserLoginType defaults to LoginTypePassword.
|
||||
UserLoginType LoginType `json:"login_type"`
|
||||
// DisableLogin sets the user's login type to 'none'. This prevents the user
|
||||
// from being able to use a password or any other authentication method to login.
|
||||
// Deprecated: Set UserLoginType=LoginTypeDisabled instead.
|
||||
DisableLogin bool `json:"disable_login"`
|
||||
OrganizationID uuid.UUID `json:"organization_id" validate:"" format:"uuid"`
|
||||
}
|
||||
|
Reference in New Issue
Block a user