feat: Allow hiding password auth, changing OpenID Connect text and OpenID Connect icon (#5101)

* Allow hiding password entry, changing OpenID Connect text and OpenID Connect icon

* Docs

* Cleaning

* Fix Prettier and Go test and TS compile error

* Fix LoginPage test

* Prettier

* Fix storybook

* Add query param to un-hide password auth

* Cleaning

* Hide password by default when OIDC enabled

* Ran prettier, updated goldenfiles and ran "make gen"

* Fixed and added LoginPage test

* Ran prettier

* PR Feedback and split up SignInForm.tsx

* Updated golden files

* Fix auto-genned-files

* make gen -B

* Revert provisioner files?

* Fix lint error

---------

Co-authored-by: Kyle Carberry <kyle@coder.com>
This commit is contained in:
Arthur Normand
2023-01-31 18:33:25 +00:00
committed by GitHub
co-authored by Kyle Carberry
parent 480f3b6e43
commit 69fce0488e
23 changed files with 572 additions and 201 deletions
+22
View File
@@ -562,6 +562,17 @@ curl -X GET http://coder-server:8080/api/v2/config/deployment \
"usage": "string",
"value": ["string"]
},
"icon_url": {
"default": "string",
"enterprise": true,
"flag": "string",
"hidden": true,
"name": "string",
"secret": true,
"shorthand": "string",
"usage": "string",
"value": "string"
},
"ignore_email_verified": {
"default": true,
"enterprise": true,
@@ -595,6 +606,17 @@ curl -X GET http://coder-server:8080/api/v2/config/deployment \
"usage": "string",
"value": ["string"]
},
"sign_in_text": {
"default": "string",
"enterprise": true,
"flag": "string",
"hidden": true,
"name": "string",
"secret": true,
"shorthand": "string",
"usage": "string",
"value": "string"
},
"username_field": {
"default": "string",
"enterprise": true,
+95 -9
View File
@@ -663,23 +663,45 @@
| `audit_logs` | array of [codersdk.AuditLog](#codersdkauditlog) | false | | |
| `count` | integer | false | | |
## codersdk.AuthMethods
## codersdk.AuthMethod
```json
{
"github": true,
"oidc": true,
"password": true
"enabled": true
}
```
### Properties
| Name | Type | Required | Restrictions | Description |
| ---------- | ------- | -------- | ------------ | ----------- |
| `github` | boolean | false | | |
| `oidc` | boolean | false | | |
| `password` | boolean | false | | |
| Name | Type | Required | Restrictions | Description |
| --------- | ------- | -------- | ------------ | ----------- |
| `enabled` | boolean | false | | |
## codersdk.AuthMethods
```json
{
"github": {
"enabled": true
},
"oidc": {
"enabled": true,
"iconUrl": "string",
"signInText": "string"
},
"password": {
"enabled": true
}
}
```
### Properties
| Name | Type | Required | Restrictions | Description |
| ---------- | -------------------------------------------------- | -------- | ------------ | ----------- |
| `github` | [codersdk.AuthMethod](#codersdkauthmethod) | false | | |
| `oidc` | [codersdk.OIDCAuthMethod](#codersdkoidcauthmethod) | false | | |
| `password` | [codersdk.AuthMethod](#codersdkauthmethod) | false | | |
## codersdk.AuthorizationCheck
@@ -1898,6 +1920,17 @@ CreateParameterRequest is a structure used to create a new parameter value for a
"usage": "string",
"value": ["string"]
},
"icon_url": {
"default": "string",
"enterprise": true,
"flag": "string",
"hidden": true,
"name": "string",
"secret": true,
"shorthand": "string",
"usage": "string",
"value": "string"
},
"ignore_email_verified": {
"default": true,
"enterprise": true,
@@ -1931,6 +1964,17 @@ CreateParameterRequest is a structure used to create a new parameter value for a
"usage": "string",
"value": ["string"]
},
"sign_in_text": {
"default": "string",
"enterprise": true,
"flag": "string",
"hidden": true,
"name": "string",
"secret": true,
"shorthand": "string",
"usage": "string",
"value": "string"
},
"username_field": {
"default": "string",
"enterprise": true,
@@ -3192,6 +3236,24 @@ CreateParameterRequest is a structure used to create a new parameter value for a
| `client_secret` | [codersdk.DeploymentConfigField-string](#codersdkdeploymentconfigfield-string) | false | | |
| `enterprise_base_url` | [codersdk.DeploymentConfigField-string](#codersdkdeploymentconfigfield-string) | false | | |
## codersdk.OIDCAuthMethod
```json
{
"enabled": true,
"iconUrl": "string",
"signInText": "string"
}
```
### Properties
| Name | Type | Required | Restrictions | Description |
| ------------ | ------- | -------- | ------------ | ----------- |
| `enabled` | boolean | false | | |
| `iconUrl` | string | false | | |
| `signInText` | string | false | | |
## codersdk.OIDCConfig
```json
@@ -3240,6 +3302,17 @@ CreateParameterRequest is a structure used to create a new parameter value for a
"usage": "string",
"value": ["string"]
},
"icon_url": {
"default": "string",
"enterprise": true,
"flag": "string",
"hidden": true,
"name": "string",
"secret": true,
"shorthand": "string",
"usage": "string",
"value": "string"
},
"ignore_email_verified": {
"default": true,
"enterprise": true,
@@ -3273,6 +3346,17 @@ CreateParameterRequest is a structure used to create a new parameter value for a
"usage": "string",
"value": ["string"]
},
"sign_in_text": {
"default": "string",
"enterprise": true,
"flag": "string",
"hidden": true,
"name": "string",
"secret": true,
"shorthand": "string",
"usage": "string",
"value": "string"
},
"username_field": {
"default": "string",
"enterprise": true,
@@ -3295,9 +3379,11 @@ CreateParameterRequest is a structure used to create a new parameter value for a
| `client_id` | [codersdk.DeploymentConfigField-string](#codersdkdeploymentconfigfield-string) | false | | |
| `client_secret` | [codersdk.DeploymentConfigField-string](#codersdkdeploymentconfigfield-string) | false | | |
| `email_domain` | [codersdk.DeploymentConfigField-array_string](#codersdkdeploymentconfigfield-array_string) | false | | |
| `icon_url` | [codersdk.DeploymentConfigField-string](#codersdkdeploymentconfigfield-string) | false | | |
| `ignore_email_verified` | [codersdk.DeploymentConfigField-bool](#codersdkdeploymentconfigfield-bool) | false | | |
| `issuer_url` | [codersdk.DeploymentConfigField-string](#codersdkdeploymentconfigfield-string) | false | | |
| `scopes` | [codersdk.DeploymentConfigField-array_string](#codersdkdeploymentconfigfield-array_string) | false | | |
| `sign_in_text` | [codersdk.DeploymentConfigField-string](#codersdkdeploymentconfigfield-string) | false | | |
| `username_field` | [codersdk.DeploymentConfigField-string](#codersdkdeploymentconfigfield-string) | false | | |
## codersdk.Organization
+11 -3
View File
@@ -139,9 +139,17 @@ curl -X GET http://coder-server:8080/api/v2/users/authmethods \
```json
{
"github": true,
"oidc": true,
"password": true
"github": {
"enabled": true
},
"oidc": {
"enabled": true,
"iconUrl": "string",
"signInText": "string"
},
"password": {
"enabled": true
}
}
```