also looking at this
A read-scoped site key, so a Stacks dashboard can read analytics without a person's credentials
#68
7 files
+550
-11
| @@ -37,6 +37,21 @@ export default defineModel({ | ||
| 37 | 37 | validation: { rule: schema.string().required().max(255) }, |
| 38 | 38 | }, |
| 39 | 39 | |
| 40 | // Secret read key: a machine presents it as `Authorization: Bearer` to read | |
| 41 | // this site's analytics without a person's credentials (#67). Not fillable | |
| 42 | // and with no factory — issued on demand from site settings, revoked by | |
| 43 | // setting it back to null. See app/Support/read-key.ts. | |
| 44 | read_key: { | |
| 45 | fillable: false, | |
| 46 | hidden: true, | |
| 47 | validation: { rule: schema.string() }, | |
| 48 | }, | |
| 49 | ||
| 50 | read_key_last_used_at: { | |
| 51 | fillable: false, | |
| 52 | validation: { rule: schema.string() }, | |
| 53 | }, | |
| 54 | ||
| 40 | 55 | domains: { |
| 41 | 56 | fillable: true, |
| 42 | 57 | validation: { rule: schema.string().optional() }, |