简体   繁体   English

Oauth2过程给出的access_token无权访问Orion FI-LAB

[英]access_token given by Oauth2 procedure is not authorized for accessing Orion FI-LAB

The oauth2 procedure that we used to get the access token for accessing Orion FI-LAB instance provided at https://github.com/fgalan/oauth2-example-orion-client does not work anymore. https://github.com/fgalan/oauth2-example-orion-client提供的用于获取访问Orion FI-LAB实例的访问令牌的oauth2过程不再起作用。 something has happened since 10 days ago. 从10天前开始发生了一些事情。 we have used the same procedure for retrieving the token in our android application.now either our android app dose not work. 我们已经使用相同的过程在我们的android应用程序中检索令牌。现在我们的android应用程序均无法正常工作。

The probblem is : 问题是:

The access token generated by the server.js code is not recognized as a valid X-Auth-Token for the orion FI-LAB instance (orion.lab.fi-ware.eu:1026). 无法将server.js代码生成的访问令牌识别为Orion FI-LAB实例的有效X-Auth-Token(orion.lab.fi-ware.eu:1026)。 by running the sample we get the below response 通过运行示例,我们得到以下响应

 {
   "access_token": "3ujlcoB3uUCy45ZasN5c89DoV9549d",
   "expires_in": 3600,
   "token_type": "Bearer",
   "state": "xyz",
   "scope": "all_info",
   "refresh_token": "FrmaTmGCJ4DDKkeGlWxfERB6R3jtij"
 }

However, when we use the above access_token for making http request to orion context broker we get this answer: "User token not authorized". 但是,当我们使用上面的access_token向Orion上下文代理发出http请求时,我们得到以下答案:“未授权用户令牌”。

On the other hand, the token obtained by the token_script.sh shell works well as X-Auth-Token for the orion FI-LAB instance. 另一方面,由token_script.sh Shell获得的令牌可以很好地用作Orion FI-LAB实例的X-Auth-Token。

The question 问题

which way is going to be the stable approach to access the FI-LAB Orion instance: 哪种方法将成为访问FI-LAB Orion实例的稳定方法:

  • the procedure taken by the server.js (in which the given token is not working) or server.js采取的过程(其中给定令牌不起作用)或
  • the procedure taken by token_script.sh ? token_script.sh采取的过程

The problem could be due to different reasons: 该问题可能是由于不同的原因:

  • IDM password reseting during the FIWARE Lab migration on May 2015 在2015年5月的FIWARE Lab迁移期间重置IDM密码
  • Some bugs in the server.js script (some of them also related with changes in the security system after migration), currently fixed (githash: 49d9c416b43ecac8971379833b7b4f4b5d3016e3) server.js脚本中的某些错误(某些错误还与迁移后安全系统的更改有关),目前已修复(githash:49d9c416b43ecac8971379833b7b4f4b5d3016e3)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM