Monorepo for Tangled
tangled.org
1{
2 "lexicon": 1,
3 "id": "sh.tangled.repo.checkPushAllowed",
4 "defs": {
5 "main": {
6 "type": "query",
7 "description": "Check whether the holder of a public key is allowed to push to a repo.",
8 "parameters": {
9 "type": "params",
10 "required": ["repo", "key"],
11 "properties": {
12 "repo": {
13 "type": "string",
14 "description": "A repo DID."
15 },
16 "key": {
17 "type": "string",
18 "maxLength": 4096,
19 "description": "Public key in OpenSSH authorized_keys format."
20 }
21 }
22 },
23 "output": {
24 "encoding": "application/json",
25 "schema": {
26 "type": "object",
27 "required": ["allowed"],
28 "properties": {
29 "allowed": {
30 "type": "boolean",
31 "description": "Whether the key's owner may push to the repo."
32 },
33 "did": {
34 "type": "string",
35 "format": "did",
36 "description": "DID the key resolved to, if a match was found."
37 }
38 }
39 }
40 },
41 "errors": [
42 {
43 "name": "RepoNotFound",
44 "description": "The repo could not be resolved on this knot."
45 },
46 {
47 "name": "InvalidRequest",
48 "description": "Missing or malformed parameters."
49 }
50 ]
51 }
52 }
53}