[英]Creating a blobServiceClient in azure-sdk-for-js with JWT accessToken
When migrating from v2 to v10 version of a azure SDK javascript library , we have been facing an issue.从azure SDK javascript 库的v2版本迁移到v10版本时,我们遇到了一个问题。 We need to create a blobServiceClient
using the JWT accessToken
that has been received from acquireTokenWithAuthorizationCode
function in the adal-node library.我们需要创建一个blobServiceClient
使用JWT accessToken
已从收到acquireTokenWithAuthorizationCode
功能在阿达尔节点库。
The options seem limited to us and the examples are few.选项似乎仅限于我们,示例很少。 SimpleTokenCredential
class have been removed from the azure-sdk-for-js and thus it cannot be instantiated. SimpleTokenCredential
类已从azure-sdk-for-js 中删除,因此无法实例化。
Going, through the javascript source code for the azure-sdk-for-js library I found an option that could be useful for us but I am not sure of it.通过azure-sdk-for-js库的 javascript 源代码,我发现了一个可能对我们有用的选项,但我不确定。 Its called UserDelegationKeyCredential
.它称为UserDelegationKeyCredential
。
Is this the class that is the most suitable for our work/If it is can someone point me to the usage of this class?这是最适合我们工作的课程吗/如果是的话,有人可以告诉我这个课程的用法吗? If this is not the class then which other KeyCredential class should be used for our purpose?如果这不是类,那么应该使用哪个其他KeyCredential类来实现我们的目的?
Any help would be invaluable.任何帮助都是无价的。
According to my research, the UserDelegationKeyCredential
class is only used for generation of user delegation SAS.根据我的研究, UserDelegationKeyCredential
类仅用于生成用户委托 SAS。 For more details, please refer to the document更多详情请参考文档
Regarding how to create user delegation SAS, please refer to https://docs.microsoft.com/en-us/rest/api/storageservices/create-user-delegation-sas .关于如何创建用户委托 SAS,请参考https://docs.microsoft.com/en-us/rest/api/storageservices/create-user-delegation-sas 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.