Created
January 6, 2023 18:57
-
-
Save smijar/1633634be8b9cb44235f46c59de54b1b to your computer and use it in GitHub Desktop.
Retrieves JWT token and uses it for "curl" calls
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
export JWT_TOKEN=$(curl -s -H "Content-Type:application/json" -XPOST http://localhost:8080/tokenz -d '{"email":"youremail@youremaildomain.app", "password":"password"}' | jq -r '.token') | |
curl -H "Content-Type:application/json" -H "Authorization: Bearer $JWT_TOKEN" $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment