Created
September 6, 2016 14:17
-
-
Save flazz/f0a28f89d8d3cc74711eb39de3ed1778 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# credentials | |
# SSO=your.sso | |
# PASS=your.pass | |
# choose between prod or staging | |
HOST=https://staging.identity-internal.api.rackspacecloud.com | |
#HOST=https://identity-internal.api.rackspacecloud.com | |
# payload | |
DATA="{\"auth\":{\"RAX-AUTH:domain\":{\"name\":\"Rackspace\"},\"passwordCredentials\":{\"username\":\"${SSO}\", \"password\":\"${PASS}\"}}}" | |
# curl it | |
exec curl -v -H 'Content-Type: application/json' -X POST -d "${DATA}" "${HOST}/v2.0/tokens" | jq -r .access.token.id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment