m.third_party_invite: Allow multiple public keys

pull/977/head
Daniel Wagner-Hall 9 years ago
parent 2890d282e3
commit ea170e5dca

@ -3,7 +3,11 @@
"content": { "content": {
"display_name": "Alice Margatroid", "display_name": "Alice Margatroid",
"key_validity_url": "https://magic.forest/verifykey", "key_validity_url": "https://magic.forest/verifykey",
"public_key": "abc123" "public_key": "abc123",
"public_keys": [{
"public_key": "def456",
"key_validity_url": "https://magic.forest/verifykey"
}]
}, },
"state_key": "pc98", "state_key": "pc98",
"origin_server_ts": 1431961217939, "origin_server_ts": 1431961217939,

@ -20,7 +20,25 @@
}, },
"public_key": { "public_key": {
"type": "string", "type": "string",
"description": "A base64-encoded ed25519 key with which token must be signed." "description": "A base64-encoded ed25519 key with which token must be signed (though a signature from any entry in public_keys is also sufficient). This exists for backwards compatibility."
},
"public_keys": {
"type": "array",
"description": "Keys with which the token may be signed.",
"items": {
"type": "object",
"properties": {
"public_key": {
"type": "string",
"description": "A base-64 encoded ed25519 key with which token may be signed."
},
"key_validity_url": {
"type": "string",
"description": "An optional URL which can be fetched, with querystring public_key=public_key, to validate whether the key has been revoked. The URL must return a JSON object containing a boolean property named 'valid'. If this URL is absent, the key must be considered valid indefinitely."
},
},
"required": ["public_key"]
}
} }
}, },
"required": ["display_name", "key_validity_url", "public_key"] "required": ["display_name", "key_validity_url", "public_key"]

Loading…
Cancel
Save