From d4b181750513de90ac115c89bbbb18d59ab49aa3 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Sat, 11 Feb 2023 07:11:20 -0800 Subject: [PATCH] move curl docs from internal docs to this repo --- docs/curl login.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 docs/curl login.md diff --git a/docs/curl login.md b/docs/curl login.md new file mode 100644 index 00000000..16ec43b7 --- /dev/null +++ b/docs/curl login.md @@ -0,0 +1,10 @@ +# log in with curl + +1. curl http://127.0.0.1:8544/user/login/$ADDRESS +2. Sign the text with a site like https://www.myetherwallet.com/wallet/sign +3. POST the signed data: + + curl -X POST http://127.0.0.1:8544/user/login -H 'Content-Type: application/json' -d + '{ "address": "0x9eb9e3dc2543dc9ff4058e2a2da43a855403f1fd", "msg": "0x6c6c616d616e6f6465732e636f6d2077616e747320796f7520746f207369676e20696e207769746820796f757220457468657265756d206163636f756e743a0a3078396562396533646332353433646339464634303538653241324441343341383535343033463166440a0af09fa699f09fa699f09fa699f09fa699f09fa6990a0a5552493a2068747470733a2f2f6c6c616d616e6f6465732e636f6d2f0a56657273696f6e3a20310a436861696e2049443a20310a4e6f6e63653a203031474d37373330375344324448333854454d3957545156454a0a4973737565642041743a20323032322d31322d31345430323a32333a31372e3735333736335a0a45787069726174696f6e2054696d653a20323032322d31322d31345430323a34333a31372e3735333736335a", "sig": "16bac055345279723193737c6c67cf995e821fd7c038d31fd6f671102088c7b85ab4b13069fd2ed02da186cf549530e315d8d042d721bf81289b3ffdbe8cf9ce1c", "version": "3", "signer": "MEW" }' + +4. The response will include a bearer token. Use it with curl ... -H 'Authorization: Bearer $TOKEN'