mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 22:14:55 -04:00
scripts-dev/sign_json
: support for signing events (#11486)
This commit is contained in:
parent
a6f1a3abec
commit
f61462e1be
3 changed files with 43 additions and 1 deletions
|
@ -15,6 +15,25 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
|
||||
"""
|
||||
Script for signing and sending federation requests.
|
||||
|
||||
Some tips on doing the join dance with this:
|
||||
|
||||
room_id=...
|
||||
user_id=...
|
||||
|
||||
# make_join
|
||||
federation_client.py "/_matrix/federation/v1/make_join/$room_id/$user_id?ver=5" > make_join.json
|
||||
|
||||
# sign
|
||||
jq -M .event make_join.json | sign_json --sign-event-room-version=$(jq -r .room_version make_join.json) -o signed-join.json
|
||||
|
||||
# send_join
|
||||
federation_client.py -X PUT "/_matrix/federation/v2/send_join/$room_id/x" --body $(<signed-join.json) > send_join.json
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import base64
|
||||
import json
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue