Created
March 24, 2021 23:23
-
-
Save tbhaxor/94337f4df05adea1453a926060a72ddf to your computer and use it in GitHub Desktop.
Gunicorn token authentication
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat $1 | while read TOKEN; do | |
content=$(curl -s -H "Authorization: Token $TOKEN" $2) | |
if echo $content | grep -qi unauth; then continue | |
else echo $content; break; exit 0 | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment