Skip to content

Commit

Permalink
get token script for built-in nonprod openid
Browse files Browse the repository at this point in the history
  • Loading branch information
burnettk committed Mar 27, 2024
1 parent 9b37fdb commit 510144f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions bin/get_token
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

function error_handler() {
>&2 echo "Exited with BAD EXIT CODE '${2}' in ${0} script at line: ${1}."
exit "$2"
}
trap 'error_handler ${LINENO} $?' ERR
set -o errtrace -o errexit -o nounset -o pipefail

username="${1:-nelson}"

curl -s -X POST "localhost:8000/openid/token?code=${username}:this_is_not_secure_do_not_use_in_production" | jq -r .access_token

0 comments on commit 510144f

Please sign in to comment.