The secret contains a token which the manager can send anyone who will be in position of moderating the "discussion" but remain without access to the manager credentials.master
parent
70e1dafeaa
commit
c4566b07e2
@ -1,13 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
USERNAME="admin"
|
||||
PASSWORD="pass"
|
||||
|
||||
if [ $# -lt 2 ]; then
|
||||
echo "Usage: $0 <nickname> <nickname>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
response="$(curl -u admin:pass -s -X POST -H "Content-Type: application/json" \
|
||||
response="$(curl -u $USERNAME:$PASSWORD -s -X POST -H "Content-Type: application/json" \
|
||||
--data '{"members": {"'$1'":{}, "'$2'":{}}}' \
|
||||
http://localhost:8080/api/v1/multisig)"
|
||||
|
||||
echo $response | jq -r .secrets.$USERNAME | base32 -d | jq '. | {"'$USERNAME'": .}'
|
||||
echo $response | jq -r .secrets.$1 | base32 -d | jq '. | {"'$1'": .}'
|
||||
echo $response | jq -r .secrets.$2 | base32 -d | jq '. | {"'$2'": .}'
|
||||
|
Loading…
Reference in new issue