Paste #136964

   
pasted on 26.06.2020 11:43
  • Edit to this paste
  • Print
  • Raw
  • Compare with paste
    #  
  • Toggle line numbers
  • Syntax highlighting  
Text paste
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
#!/usr/bin/env bash

COMPAN_PERSON_ID=918
LOGIN="kFdleT+x2zQ1hfKOLtBTjfEqtpQWSr5qpPBCW4kfV3hi4eP/DLM9wxPeMyo/IpKx5TvVqiMoiyNaf9dAySAbx23RD6lfyi4GOwcUVp7Z2xUziWKfjLQZPG8HG4D+GjWEY9w6Tz9aQCdal9RQ/QTMnqLkQgIoeLddk5jlVDDAqCA="
PASSW="eOAuIAtnXChb/jvYFgoWIg2iqeNaf3JmjY+ixElXOSn7ZUNHLogLopSRFPXAlQu5wj9h3qBuDBhI8VwrCpCKLQcQHpStOypIg5l68B2o2ZPhq7TqtbV2ANJt7a9IDhZXKGm+dtY7U7SBiQ5+fdTvfGIM+7O9DvSd1ExV0pQYHk0="

TOKEN=$(http :8000/api/v1/auth/login <<< "{\"login\":\"$LOGIN\",\"password\":\"$PASSW\"}" | sed "s/{.*\"authToken\":\"\([^\"]*\).*}/\1/g")

#TOKEN="T6G5C+jsYHSjxh752aFJ3+kbTu3NZaHFhXGMjbaNIbHjIOmZIebYFXWnjMgmKOHZyKM+nwXi//D3Yinax6yCz5FBCLpc2UUSgBrRli59kiPFCl5DN6fWQBX6diwxo2tyusrjUmoRBhYZptqws0ID1fdkSImX0Lqn20F4D0AxV3i4dSTlHrgzNEpA5a7sK/ybRrxbTuG1pjbuueXcBmrJkt+rQeVli+06LsJKRbzGRB3dHZDX9LgF1YdzB1Ww13FKcIWBhHuJwuf+2ycmZMg+ECuuXUFgQNTX5UKKb5tHZ3buDcmE8+7rRfgqWjGyCk6BPlclGBSc+ovLZ+8cPfnIDSn5UzjV1ideedDqQ1mDmpPenkyEo4LH+nxflP7hXzA/pz/uGu/cu/a+SVEJdjIp6kn9p4RZmundcEPmoE9GgJKmZPmyb7F+v18JtC9ZznAFweDwnn88r5uuOHl/eUzr0GXszqcPWP6xEFtTN23vf0o1n6Eh+x3q2vsmx7xaJRBTr5xJW9wvU0UQ66oVjY5pyevg6vl2TxvPgKJubg7i7cXr+mA94WJngs0Vodeqe0VPy1dtrGj5yhd1415IWJtV/GEl5Vda4qfCgriMSvXPJNwDN2uHMOpa3DpXZDb/RJZMsM3G65fTGdD/Jf5qYxjyHELSB0N0ptaRwghCoixXsy4="
echo "TOKEN: $TOKEN"
http -f :8000/api/v1/auth/choose-company companyPersonId=$COMPANY_PERSON_ID "Authorization: Bearer $TOKEN"
http :8000/api/v1/account/get-total-balance "Authorization: Bearer $TOKEN" "Cookie: TRANSLATE_LANGUAGE=ru"
Add Comment
Author