minauthator/http_integration_tests/authorize.sh

16 lines
490 B
Bash
Raw Permalink Normal View History

#!/usr/bin/sh
curl -v http://localhost:8085/authorize \
-G \
-D "tmp/headers.txt" \
--cookie "tmp/.curl-cookies" \
-d client_id="a1785786-8be1-443c-9a6f-35feed703609" \
-d response_type="code" \
-d redirect_uri="http://localhost:9090/authorize" \
2024-11-11 22:16:50 +00:00
-d scope="user_read_basic" \
-d state="qxYAfk4kf6pbZkms78jM"
code="$(cat tmp/headers.txt | grep -i "location" | awk -F ": " '{print $2}' | trurl -f - -g "{query:code}")"
echo "$code" > tmp/authorize_code.txt