我正在使用@ azure / arm-eventhub,并且为了生成凭据,我正在使用ms-rest-azure。后来我意识到我必须使用@ azure / ms-rest-nodeauth。为了生成凭据,我正在做
async cdnLogin(){
this.credentials = await msRestNodeAuth.loginWithServicePrincipalSecret(this.clientId, this.clientSecret, this.tenantId);
}
但是它开始提供
Error: credentials argument needs to implement signRequest method
我什至尝试过
async cdnLogin(){
this.credentials = await msRestNodeAuth.loginWithUsernamePasswordWithAuthResponse(this.clientId, this.clientSecret, this.tenantId);
}
然后开始显示错误
TypeError: webResource.headers.set is not a function
源自@ azure / ms-rest-nodeauth / dist / lib / credentials / tokenCredentialsBase.js
请帮助!