Skip to content

Instantly share code, notes, and snippets.

@shaosh
Created May 23, 2017 01:04
Show Gist options
  • Save shaosh/bb0bfe418201ca31c51d1ef93fcc6227 to your computer and use it in GitHub Desktop.
Save shaosh/bb0bfe418201ca31c51d1ef93fcc6227 to your computer and use it in GitHub Desktop.
Javascript to set the auth header
var req = new XMLHttpRequest()
req.open('get', 'https://127.0.0.1:8181/Shopper/949244', true)
req.setRequestHeader('Authorization', 'sso-jwt ' + 'eyJhbGciOiAiUlMyNTYiLCAia2lkIjogIkVqaTVfc01yaVEifQ.eyJhdXRoIjogImJhc2ljIiwgImZhY3RvcnMiOiB7ImtfcHciOiAxNDk1MjM5ODUwfSwgImZpcnN0bmFtZSI6ICJTaGlodWFuIiwgImZ0YyI6IDEsICJoYmkiOiAxNDk1MjM5ODUwLCAiaWF0IjogMTQ5NTIzOTg1MCwgImp0aSI6ICJQSkt3QWI4cC0wN01HVFdwWFVBUV9RIiwgImxhc3RuYW1lIjogIlNoYW8iLCAicGVyIjogdHJ1ZSwgInBsaWQiOiAiMSIsICJzaG9wcGVySWQiOiAiOTQ5MjQ0IiwgInR5cCI6ICJpZHAiLCAidXNlcm5hbWUiOiAic3NoYW8ifQ.BS8kjmbb7e5lDT4XlEI5i2ji_myQsKv6yuO-R6qBamwycCNo6DVu7DwzCkY5RIcRug-I3l7VxHOMDaZIZrAvV9hpoU8OCWWhCZZ_kawGIFX6RUA06seUXdrt-ZFn5n939t0l7PxBNESd11RS_qTAdiSz-7EjOPIo6lCdyF42F28')
req.send()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment