test(integration/http): add hurl scenario
This commit is contained in:
parent
3713cc2443
commit
b956bdbf05
7 changed files with 0 additions and 50 deletions
1
http_integration_tests/.gitignore
vendored
1
http_integration_tests/.gitignore
vendored
|
@ -1 +0,0 @@
|
|||
tmp
|
|
@ -1,7 +0,0 @@
|
|||
#!/usr/bin/sh
|
||||
|
||||
curl -v http://localhost:8085/api/token \
|
||||
-u "a1785786-8be1-443c-9a6f-35feed703609":"49c6c16a-0a8a-4981-a60d-5cb96582cc1a" \
|
||||
-d grant_type="authorization_code" \
|
||||
-d code="$(cat tmp/authorize_code.txt)" \
|
||||
-d redirect_uri="http://localhost:9090/authorize" > tmp/access_token.json
|
|
@ -1,15 +0,0 @@
|
|||
#!/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" \
|
||||
-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
|
|
@ -1,5 +0,0 @@
|
|||
#!/usr/bin/sh
|
||||
|
||||
curl -v http://localhost:8085/api/user \
|
||||
-u "a1785786-8be1-443c-9a6f-35feed703609":"49c6c16a-0a8a-4981-a60d-5cb96582cc1a" \
|
||||
-H "Authorization: JWT $(jq -r .access_token tmp/access_token.json)"
|
|
@ -1,6 +0,0 @@
|
|||
#!/usr/bin/sh
|
||||
|
||||
curl -v http://localhost:8085/login \
|
||||
--cookie-jar "tmp/.curl-cookies" \
|
||||
-d login="test" \
|
||||
-d password="test"
|
|
@ -1,10 +0,0 @@
|
|||
#!/usr/bin/bash
|
||||
|
||||
oauth2c http://localhost:8085 \
|
||||
--client-id "a1785786-8be1-443c-9a6f-35feed703609" \
|
||||
--client-secret "49c6c16a-0a8a-4981-a60d-5cb96582cc1a" \
|
||||
--response-types code \
|
||||
--response-mode query \
|
||||
--grant-type authorization_code \
|
||||
--auth-method client_secret_basic \
|
||||
--scopes "user_read_basic"
|
|
@ -1,6 +0,0 @@
|
|||
#!/usr/bin/sh
|
||||
|
||||
curl -v http://localhost:8085/register \
|
||||
-d email="test@example.org" \
|
||||
-d handle="test" \
|
||||
-d password="test"
|
Loading…
Reference in a new issue