title: FIWARE: token_script error parsing json response
body: <p>I am trying to generate an access code using the script </p>
  
  <p><a href="https://raw.githubusercontent.com/fgalan/oauth2-example-orion-client/master/token_script.sh" rel="nofollow">https://raw.githubusercontent.com/fgalan/oauth2-example-orion-client/master/token_script.sh</a></p>
  
  <p>I believe the response json has changed and the sed pattern is not working anymore.</p>
  
  <p>How can I generate a valid access token?</p>
  
  <p>Json response:</p>
  
  <pre><code>{
  "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": []
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>line that generates the token</p>
  
  <pre><code>TOKEN=`echo $RESP | sed "s/{\"access\":{\"token\":{.*\"id\":\"\(.*\)\"},\"user.*$/\1/g"`
  </code></pre>
  
  <p>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   </p>
  
  <p>Thanks</p>