[ https://jira.fiware.org/browse/HELP-9473?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Fernando Lopez updated HELP-9473:
---------------------------------
Description:
Created question in FIWARE Q/A platform on 12-05-2015 at 16:05
{color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/30193763/fiware-token-script-error-parsing-json-response
+Question:+
FIWARE: token_script error parsing json response
+Description:+
I am trying to generate an access code using the script
https://raw.githubusercontent.com/fgalan/oauth2-example-orion-client/master/token_script.sh
I believe the response json has changed and the sed pattern is not working anymore.
How can I generate a valid access token?
Json response:
{
"access": {
"token": {
"issued_at": "2015-05-12T14:29:03.523315",
"expires": "2015-05-12T15:29:03Z",
"id": "?????",
"audit_ids": [
"????"
]
},
"serviceCatalog": [],
"user": {
"username": "pedro at viur.pt",
"roles_links": [],
"id": "pedro-almeida",
"roles": [],
"name": "pedro at viur.pt"
},
"metadata": {
"is_admin": 0,
"roles": []
}
}
}
line that generates the token
TOKEN=`echo $RESP | sed "s/{\"access\":{\"token\":{.*\"id\":\"\(.*\)\"},\"user.*$/\1/g"`
I have tried to use the access:token:id returned but it does not work.
The new id is also shorter then the old ones
Thanks
was:
Created question in FIWARE Q/A platform on 12-05-2015 at 16:05
{color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/30193763/fiware-token-script-error-parsing-json-response
+Question:+
FIWARE: token_script error parsing json response
+Description:+
I am trying to generate an access code using the script
https://raw.githubusercontent.com/fgalan/oauth2-example-orion-client/master/token_script.sh
I believe the response json has changed and the sed pattern is not working anymore.
How can I generate a valid access token?
Json response:
{
"access": {
"token": {
"issued_at": "2015-05-12T14:29:03.523315",
"expires": "2015-05-12T15:29:03Z",
"id": "?????",
"audit_ids": [
"????"
]
},
"serviceCatalog": [],
"user": {
"username": "pedro at viur.pt",
"roles_links": [],
"id": "pedro-almeida",
"roles": [],
"name": "pedro at viur.pt"
},
"metadata": {
"is_admin": 0,
"roles": []
}
}
}
line that generates the token
TOKEN=`echo $RESP | sed "s/{\"access\":{\"token\":{.*\"id\":\"\(.*\)\"},\"user.*$/\1/g"`
I have tried to use the access:token:id returned but it does not work.
The new id is also shorter then the old ones
Thanks
HD-Enabler: Orion
> [fiware-stackoverflow] FIWARE: token_script error parsing json response
> -----------------------------------------------------------------------
>
> Key: HELP-9473
> URL: https://jira.fiware.org/browse/HELP-9473
> Project: Help-Desk
> Issue Type: Monitor
> Components: FIWARE-TECH-HELP
> Reporter: Backlog Manager
> Assignee: Backlog Manager
> Labels: fiware, fiware-orion
>
> Created question in FIWARE Q/A platform on 12-05-2015 at 16:05
> {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/30193763/fiware-token-script-error-parsing-json-response
> +Question:+
> FIWARE: token_script error parsing json response
> +Description:+
> I am trying to generate an access code using the script
> https://raw.githubusercontent.com/fgalan/oauth2-example-orion-client/master/token_script.sh
> I believe the response json has changed and the sed pattern is not working anymore.
> How can I generate a valid access token?
> Json response:
> {
> "access": {
> "token": {
> "issued_at": "2015-05-12T14:29:03.523315",
> "expires": "2015-05-12T15:29:03Z",
> "id": "?????",
> "audit_ids": [
> "????"
> ]
> },
> "serviceCatalog": [],
> "user": {
> "username": "pedro at viur.pt",
> "roles_links": [],
> "id": "pedro-almeida",
> "roles": [],
> "name": "pedro at viur.pt"
> },
> "metadata": {
> "is_admin": 0,
> "roles": []
> }
> }
> }
> line that generates the token
> TOKEN=`echo $RESP | sed "s/{\"access\":{\"token\":{.*\"id\":\"\(.*\)\"},\"user.*$/\1/g"`
> I have tried to use the access:token:id returned but it does not work.
> The new id is also shorter then the old ones
> Thanks
--
This message was sent by Atlassian JIRA
(v6.4.1#64016)
You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy Cookies policy