I am trying to create an access code using a script
https://raw.githubusercontent.com/fgalan/oauth2-example-orion-client/master/token_script.sh
I believe the json response has changed and the sed pattern no longer works.
How can I create a valid access token?
Json answer:
{
"access": {
"token": {
"issued_at": "2015-05-12T14:29:03.523315",
"expires": "2015-05-12T15:29:03Z",
"id": "?????",
"audit_ids": [
"????"
]
},
"serviceCatalog": [],
"user": {
"username": "pedro@viur.pt",
"roles_links": [],
"id": "pedro-almeida",
"roles": [],
"name": "pedro@viur.pt"
},
"metadata": {
"is_admin": 0,
"roles": []
}
}
}
which generates a token
TOKEN=`echo $RESP | sed "s/{\"access\":{\"token\":{.*\"id\":\"\(.*\)\"},\"user.*$/\1/g"`
I tried using access: token: id, but it does not work. The new identifier is also shorter than the old ones.
thank
source
share