[英]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.