有没有办法延长已经过期的Azure sas令牌的有效期? [英] Is there a way to extend the expiry of an already expired Azure sas token?

查看:161
本文介绍了有没有办法延长已经过期的Azure sas令牌的有效期?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我正在工作的项目中,SAS令牌用于下载Azure Blob存储中的文件.其中一些令牌已过期.我想知道是否可以通过任何方式扩展过期的令牌,以便再次使用它们.

In the project I am working, SAS token is used for downloading files in Azure Blob storage. Some of those tokens have expired. I want to know whether there is any way by which the expired tokens can be extended so that they can be used again.

推荐答案

我想知道过期令牌是否有任何方式可以扩展以便再次使用.

I want to know whether there is any way by which the expired tokens can be extended so that they can be used again.

好吧,答案是否定的.实际上,这取决于您如何创建SAS令牌.

Well, the answer is both no and yes. It actually depends on how you created a SAS token.

假设您创建了SAS令牌而未使用共享访问策略,且该策略中指定了有效期,那么答案是否定的.令牌过期后,您将需要使用新的失效日期创建一个新的SAS令牌并使用它.因此,没有机制可以延长现有令牌的有效期.

Assuming you have created a SAS token without using a Shared Access Policy with expiry date specified in the policy, then the answer is no. Once a token has expired, you will need to create a new SAS token with new expiry date and use that. As such there's no mechanism to extend the expiry of an existing token.

如果您使用共享访问策略创建了SAS令牌,并且已定义了有效期,那么答案是肯定的..您只需在共享访问策略"中更改有效期,然后就可以使用相同的SAS令牌.

If you have created a SAS token using a Shared Access Policy and that has expiry date defined, then the answer is yes. You can simply change the expiry date in the Shared Access Policy and then the same SAS token can be used.

这篇关于有没有办法延长已经过期的Azure sas令牌的有效期?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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