简体   繁体   English

如何在Keyrock FIWARE中配置X-AUTH-TOKEN

[英]How can I configure the X-AUTH-TOKEN in the keyrock FIWARE

I want to configure the X-Auth-Token of Keyrock created by Fiware. 我想配置Fiware创建的Keyrock的X-Auth-Token。 But the thing is that the X-Auth-Token expire after an hour. 但事实是X-Auth-Token会在一个小时后过期。 And I want that the X-Auth-Token expire when the session is inactive or I want to know when can I reactive the auth-token for example when the token has 20 min left. 我希望当会话处于非活动状态时X-Auth-Token过期,或者我想知道何时可以响应auth-token,例如令牌还剩20分钟时。

I don't know if I have explain well. 我不知道我是否解释得很好。

Thank you so much. 非常感谢。

You can see how to configure the Keystone tokens expiration here . 您可以在此处查看如何配置Keystone令牌过期

For OAuth2 tokens, you can follow as described here : 对于OAuth2用户令牌,你可以遵循这里描述

1) import CONF: from keystone import config CONF = config.CONF 1)导入CONF:从梯形失真导入配置CONF = config.CONF

2) add this line in "def init" of "class Server", just after the comments: tokene 2)在注释之后添加此行到“类服务器”的“ def init”中:tokene

xpiresin=CONF.token.expiration xpiresin = CONF.token.expiration

The second link has a reference for how to configure expiration time for keystone tokens (there is a config file in which you can set this) and some ideas about the same for OAuth2 tokens. 第二个链接提供了有关如何配置Keystone令牌的到期时间的参考(存在一个可在其中设置此配置文件的配置文件),以及关于OAuth2令牌的相同设置的一些想法。

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

相关问题 Angular 8 - 如何向我的请求 header 添加 X-Auth-Token? - Angular 8 - How to add to my request header a X-Auth-Token? 如何在 Postman 中设置 X-Auth-Token? - How to set up X-Auth-Token in Postman? 如何使用asp.net核心api在标头中使用x-auth-token授权请求? - How to authorize requests with x-auth-token in its header using asp.net core api? 通过JavaScript / Angular / Ionic Promise获取x-Auth-Token - GET x-Auth-Token via JavaScript/Angular/Ionic Promise 在WSO2 ESB中的http连接端点中设置X-Auth-Token标头 - Set X-Auth-Token header in http connection endpoint in WSO2 ESB 尝试使用带有 X-Auth-Token 的 Javascript 访问 JSON 端点会导致错误 - Trying to access JSON endpoint using Javascript with X-Auth-Token leads to error 如何使用 React 存储 API 身份验证令牌? - How can I store an API auth token using React? 如何处理devise_token_auth中的访问令牌 - How can I handle the access-token in devise_token_auth 无法对Fiware Lab KeyRock实例中的应用程序的用户进行身份验证 - Unable to authenticate users for an app in Fiware Lab KeyRock instance 我可以在一个站点中混合使用会话身份验证和令牌身份验证吗? - Can I mix sessions auth and token auth in one site?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM