CosmoDB授权已无效到期 [英] CosmoDB Authorisation Fixed with No Expiry

查看:68
本文介绍了CosmoDB授权已无效到期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


如何获得没有过期的授权标头值?我正在使用C#创建它完美的工作但是一分钟后它就会过期并向我显示403 Forbidden错误并告诉我生成新的错误。我希望授权值固定并且n到期。

解决方案


否您不能拥有固定的授权令牌值,但最多可以使用5个小时。看看这个:  https://docs.microsoft.com/en-us/rest/api/cosmos-db/permissions


你必须建立一个机制来刷新你的令牌。请注意,刷新令牌可提高应用程序的安全性。您会发现Auth0的不同模式通常用于刷新令牌。


干杯


K



Hello,

How can I get Authorisation header value with No expiry ? I am creating using C# it works perfectly but after a minute it gets expired and shows me 403 Forbidden error and tells me to generate new one. I want the authorisation value to fixed and with n expiry.

解决方案

Hi,

No you cannot have a fixed Authorization token value, but you can have it atmost for 5 hours. Check this out: https://docs.microsoft.com/en-us/rest/api/cosmos-db/permissions

You will have to build a mechanism to refresh your token. Note that refresh token improves security of your application. You will find different patterns for Auth0 typically to refresh the tokens.

Cheers

K


这篇关于CosmoDB授权已无效到期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆