#/bin/bash ID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1) echo create instance with id $ID #HOST=https://backend.demo.taler.net #AUTH="ApiKey sandbox" #CURRENCY=KUDOS HOST=http://localhost:9966 AUTH="Bearer secret-token:super_secret" CURRENCY=COL set -x curl -q $HOST/private/instances -H "Authorization: $AUTH" --data-raw '{"default_wire_transfer_delay":{"d_ms":2000},"auth": { "method": "token", "token":"secret-token:asd" },"default_pay_delay":{"d_ms":1000},"jurisdiction":{},"address":{},"default_wire_fee_amortization":10,"default_max_wire_fee":"'$CURRENCY':2","default_max_deposit_fee":"'$CURRENCY':1","payto_uris":[],"name":"qwe","id":"'$ID'"}' echo should be token but is external curl -q $HOST/private/instances/$ID | jq '.auth' echo setting into token curl -q $HOST/private/instances/$ID/auth -d '{"method":"token","token":"secret-token:asd"}' echo should fail curl -q $HOST/private/instances/$ID | jq '.auth' echo should get method token curl -q $HOST/private/instances/$ID -H "Authorization: Bearer secret-token:asd" | jq '.auth'