challenger

OAuth 2.0-based authentication service that validates user can receive messages at a certain address
Log | Files | Refs | Submodules | README | LICENSE

commit 477be7d5285342fcf86e8fa94c836b3ce300cb63
parent 6f36f46bae0d51fd819accbba03062a9e9366648
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun, 12 Jan 2025 10:32:09 +0100

explicitly request html in test

Diffstat:
Msrc/challenger/test-challenger-pkce.sh | 1+
Msrc/challenger/test-challenger.sh | 7++-----
2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/challenger/test-challenger-pkce.sh b/src/challenger/test-challenger-pkce.sh @@ -139,6 +139,7 @@ PIN=$(cat ${FILENAME} | awk '{print $2}') echo -n "Initiating PIN ${PIN} submission..." RESULT=$(curl "${BURL}/solve/${NONCE}" \ -X POST \ + -H "Accept: text/html" \ --data-urlencode "pin=${PIN}" \ -w "%{http_code} %{redirect_url}" -s -o $LAST_RESPONSE) STATUS=$(echo "$RESULT" | awk '{print $1}') diff --git a/src/challenger/test-challenger.sh b/src/challenger/test-challenger.sh @@ -133,6 +133,7 @@ PIN=$(cat ${FILENAME} | awk '{print $2}') echo -n "Initiating PIN ${PIN} submission..." RESULT=$(curl "${BURL}/solve/${NONCE}" \ -X POST \ + -H "Accept: text/html" \ --data-urlencode "pin=${PIN}" \ -w "%{http_code} %{redirect_url}" -s -o $LAST_RESPONSE) STATUS=$(echo "$RESULT" | awk '{print $1}') @@ -140,10 +141,6 @@ TARGET=$(echo "$RESULT" | awk '{print $2}') if [ "$STATUS" != "302" ] then - curl -v "${BURL}/solve/${NONCE}" \ - -X POST \ - --data-urlencode "pin=${PIN}" - cat httpd.log exit_fail "Expected 302. Got: $STATUS" $(cat $LAST_RESPONSE) fi @@ -193,7 +190,7 @@ then exit_fail "Expected 200 OK. Got: $STATUS" $(cat $LAST_RESPONSE) fi -cat $LAST_RESPONSE | jq +# cat $LAST_RESPONSE | jq TADDRESS=$(cat "$LAST_RESPONSE" | jq -r .address.filename) TADDRESS_TYPE=$(cat "$LAST_RESPONSE" | jq -r .address_type)