Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c2977cf

Browse files
committed
Fix: HashedSecret
1 parent 1ebf408 commit c2977cf

File tree

5 files changed

+25
-27
lines changed

5 files changed

+25
-27
lines changed

coderd/apidoc/docs.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4607,7 +4607,6 @@ const docTemplate = `{
46074607
"format": "date-time"
46084608
},
46094609
"user_id": {
4610-
"description": "NOTE: do not ever return the HashedSecret",
46114610
"type": "string",
46124611
"format": "uuid"
46134612
}

coderd/apidoc/swagger.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4068,7 +4068,6 @@
40684068
"format": "date-time"
40694069
},
40704070
"user_id": {
4071-
"description": "NOTE: do not ever return the HashedSecret",
40724071
"type": "string",
40734072
"format": "uuid"
40744073
}

codersdk/apikey.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import (
1010
"github.com/google/uuid"
1111
)
1212

13+
// APIKey: do not ever return the HashedSecret
1314
type APIKey struct {
14-
ID string `json:"id" validate:"required"`
15-
// NOTE: do not ever return the HashedSecret
15+
ID string `json:"id" validate:"required"`
1616
UserID uuid.UUID `json:"user_id" validate:"required" format:"uuid"`
1717
LastUsed time.Time `json:"last_used" validate:"required" format:"date-time"`
1818
ExpiresAt time.Time `json:"expires_at" validate:"required" format:"date-time"`

docs/api/schemas.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -81,17 +81,17 @@
8181

8282
### Properties
8383

84-
| Name | Type | Required | Restrictions | Description |
85-
| ------------------ | -------------------------------------------- | -------- | ------------ | ------------------------------------------- |
86-
| `created_at` | string | true | | |
87-
| `expires_at` | string | true | | |
88-
| `id` | string | true | | |
89-
| `last_used` | string | true | | |
90-
| `lifetime_seconds` | integer | true | | |
91-
| `login_type` | [codersdk.LoginType](#codersdklogintype) | true | | |
92-
| `scope` | [codersdk.APIKeyScope](#codersdkapikeyscope) | true | | |
93-
| `updated_at` | string | true | | |
94-
| `user_id` | string | true | | User ID do not ever return the HashedSecret |
84+
| Name | Type | Required | Restrictions | Description |
85+
| ------------------ | -------------------------------------------- | -------- | ------------ | ----------- |
86+
| `created_at` | string | true | | |
87+
| `expires_at` | string | true | | |
88+
| `id` | string | true | | |
89+
| `last_used` | string | true | | |
90+
| `lifetime_seconds` | integer | true | | |
91+
| `login_type` | [codersdk.LoginType](#codersdklogintype) | true | | |
92+
| `scope` | [codersdk.APIKeyScope](#codersdkapikeyscope) | true | | |
93+
| `updated_at` | string | true | | |
94+
| `user_id` | string | true | | |
9595

9696
#### Enumerated Values
9797

docs/api/users.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -587,18 +587,18 @@ curl -X GET http://coder-server:8080/api/v2/users/{user}/keys/tokens \
587587

588588
Status Code **200**
589589

590-
| Name | Type | Required | Restrictions | Description |
591-
| -------------------- | ------------------------------------------------------ | -------- | ------------ | ------------------------------------------- |
592-
| `[array item]` | array | false | | |
593-
| `» created_at` | string(date-time) | true | | |
594-
| `» expires_at` | string(date-time) | true | | |
595-
| `» id` | string | true | | |
596-
| `» last_used` | string(date-time) | true | | |
597-
| `» lifetime_seconds` | integer | true | | |
598-
| `» login_type` | [codersdk.LoginType](schemas.md#codersdklogintype) | true | | |
599-
| `» scope` | [codersdk.APIKeyScope](schemas.md#codersdkapikeyscope) | true | | |
600-
| `» updated_at` | string(date-time) | true | | |
601-
| `» user_id` | string(uuid) | true | | User ID do not ever return the HashedSecret |
590+
| Name | Type | Required | Restrictions | Description |
591+
| -------------------- | ------------------------------------------------------ | -------- | ------------ | ----------- |
592+
| `[array item]` | array | false | | |
593+
| `» created_at` | string(date-time) | true | | |
594+
| `» expires_at` | string(date-time) | true | | |
595+
| `» id` | string | true | | |
596+
| `» last_used` | string(date-time) | true | | |
597+
| `» lifetime_seconds` | integer | true | | |
598+
| `» login_type` | [codersdk.LoginType](schemas.md#codersdklogintype) | true | | |
599+
| `» scope` | [codersdk.APIKeyScope](schemas.md#codersdkapikeyscope) | true | | |
600+
| `» updated_at` | string(date-time) | true | | |
601+
| `» user_id` | string(uuid) | true | | |
602602

603603
#### Enumerated Values
604604

0 commit comments

Comments
 (0)