我正在尝试使用 Python 中的 REST Api 向我的 Azure Servicebus 队列发送消息(无法在 Orange PI Zero 系统上使用 Azure 包,没有足够的内存来安装包...)。
现在是example page显示特定格式的 Authorization
header :
Authorization: SharedAccessSignature sr=your-namespace&sig=Fg8yUyR4MOmXfHfj55f5hY4jGb8x2Yc%2b3%2fULKZYxKZk%3d&se=1404256819&skn=RootManageSharedAccessKey
如何从 Azure 门户获取 SAS token 的 se
(“ token 立即到期”:reference)值?它只显示“主要”/“次要”键...
最佳答案
How do I obtain the se ("Token expiry instant": reference) value for my SAS token from the Azure Portal? It only shows "Primary"/"Secondary" key
这是您需要自行计算的内容,因为它指示您的 SAS token 何时到期。例如,如果您希望 SAS token 在创建后 15 分钟内过期,您将获得从现在起 15 分钟后的日期/时间值,并计算该日期/时间与纪元(1 月 1 日, 1970 年 00:00:00 世界标准时间)。
一旦获得该值,您将需要使用此处描述的逻辑来计算签名:https://learn.microsoft.com/en-us/azure/service-bus-messaging/service-bus-sas#generate-a-shared-access-signature-token .
关于azure - 通过 Azure 门户获取的 Servicebus SAS token 的时间戳是多少?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62735329/