- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
与 Postman我将一个 POST
发送到 https://directline.botframework.com/v3/directline/tokens/generate
,标题为 Authorization: Bearer MySecret
响应是
{
"conversationId": "MyConversationID",
"token": "MyToken",
"expires_in": 3600
}
现在我可以使用 token 访问此 URL
https://directline.botframework.com/embed/MyName?t=MyToken
我已经打开了一个聊天室。 (我假设)3600 秒后,我无法再访问该 URL,因为它已过期。
我可以通过 Postman 将 POST 发送到 https://directline.botframework.com/v3/directline/tokens/refresh
并使用此 header Authorization: Bearer 来“刷新”我的 token MyToken
它给了我这个响应
{
"conversationId": "MyConversationID",
"token": "MySecondToken",
"expires_in": 3600
}
我假设 https://directline.botframework.com/embed/MyName?t=MyToken
仍会在 3600 秒后耗尽,但我可以继续使用 https 聊天://directline.botframework.com/embed/MyName?t=MySecondToken
因为它们具有相同的 conversationId
。但它也会在 3600 秒后过期。
是否可以设置我自己的 expires_in
值?
是否可以删除 expires_in
以使 token 永久存在?
最佳答案
不,无法更改 expires_in
值。也不可能将其删除。这样做会违背发行和使用 token 背后的目的,即提供一定程度的安全性和混淆性。通过将 token 与对话 ID 结合使用,您可以让不怀好意的人更难访问您的应用程序和数据。
并不是绝对有必要或必须使用 token (这取决于您的应用程序需求)。你可以随时使用你的 secret ,但要小心。您可以在 BotFramework 文档 here 中阅读有关 token 和 secret 使用的更多信息。 .
如果您计划使用 token ,请在 token 过期之前自动调用刷新 token 。然后将 token 换成新的。
希望得到帮助!
关于azure - 处理 directline Tokens 及其 "expires_in",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57805795/
我正致力于通过 OAuth 合并外部 API,但对 expires_in 属性的用途有点迷惑。通过阅读,应该对 api token 的使用进行防御性编码,因为您应该预料到 token 在任何时候都可能
在任意 Rails Controller 中,下面的行会起作用吗? caches_page :show, :expires_in => 1.days 我使用 memcached,但对页面缓存的工作方式
我正在尝试像这样缓存数据: def index Rails.cache.fetch("someCache", expires_in: 12.hours) do 'someConte
与 Postman我将一个 POST 发送到 https://directline.botframework.com/v3/directline/tokens/generate ,标题为 Author
我刚刚注意到这个方法在我的 ASP.NET Web 应用程序中失败了,因为我没有满足响应中缺少 'expires_in' 的需求。 我最近没有更改任何代码,并且不知道响应中缺少此代码的任何原因。这是否
我正在尝试扩大“expires_in”的值(来自凭证对象,现在是 3600 秒),因为我想让用户长时间使用我的应用程序。我正在使用刷新 token ,但只有在用户经常使用应用程序时才会刷新。 如果您知
在保持“获取或设置”缓存调用的简洁性的同时清除此警告的最佳方法是什么?我真的很喜欢不必先获取,然后检查零,然后设置... # DEPRECATION WARNING: Setting :expires
我正在开发一个使用 facebook 集成的应用程序。我正在尝试从 facebook 库类接收 access_token 和 expires_in token 。一旦我登录,我就正确地获得了 acce
我将 ruby 2.3.3 和 Rails 4.2.8 与 Puma(1 个工作人员,5 个线程)一起使用,在我的管理(即不重要)页面上,我想显示我的数据库中的一些统计信息(整数值)。有些请求需要
我很困惑为什么 OpenId 连接规范(来源:https://openid.net/specs/openid-connect-core-1_0.html#TokenResponse)引用 JWT 中的
如何在 Oauth_provider 工具包 django rest framework django 中增加访问 token 的 expires_in 时间(默认情况下为 36000 i) 我想增加
我是一名优秀的程序员,十分优秀!