Skip to content

Instantly share code, notes, and snippets.

@pedroxs
Created May 8, 2017 13:46
Show Gist options
  • Save pedroxs/4ecef2ca53212cef56b6bc827b235e8b to your computer and use it in GitHub Desktop.
Save pedroxs/4ecef2ca53212cef56b6bc827b235e8b to your computer and use it in GitHub Desktop.
easily generate authenticated resty header config for specified url
# easily generate authenticated resty header config for specified url
export _url=http://localhost:8080
resty $_url -H "Content-Type: application/json" -H "Accept: application/json" -H "$(curl -s $_url/api/authenticate -d '{"username":"admin","password":"admin","rememberMe":true}' -H 'Content-Type: application/json;charset=UTF-8' | jq '"Authorization: Bearer " + .id_token' -r)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment