英文:
pdfservices-node-sdk : can not use server to server authentication using this lib?
问题
我正在使用Adobe PDF服务的Node库(@adobe/pdfservices-node-sdk": "^3.3.0)。
之前,我是使用服务帐户凭据来生成PDF,一切正常,直到几天前突然停止工作。我已经检查了凭据/ API 配额,一切看起来都正常。
我可以看到他们希望我们迁移到使用Auth0的服务器到服务器的方式,但似乎这个库没有任何接受凭据(不包括私钥)的方法/函数。
所有他们的示例代码/文档都提到了使用"PDFServicesSdk.Credentials.serviceAccountCredentialsBuilder()",但这是针对旧的(已弃用)凭据的;看不到可以用于服务器到服务器Auth0凭据的新方法?
有人遇到同样的问题吗?
谢谢,
Kushal
所有凭据和配额限制都正常。
英文:
I am using the node library of aodbe pdf service (@adobe/pdfservices-node-sdk": "^3.3.0).
Earlier I was using Service account credentials to generate the pdf and it was working fine till few days back; but all of sudden it stopped working. I have checked the credentials/api quota and all looks fine.
I can see that they want to migrate us to server to server using Auth0; but seems like this library doesn't have any method/functions to accept credentials (without private key).
All their sample codes/documentation mentions using "PDFServicesSdk.Credentials.serviceAccountCredentialsBuilder()", but this was for older (deprecated) credentials; can't see any new method that can be called for server to server auth0 credentials?
Is any one facing the same issue?
Thanks,
Kushal
All credentials and quota limit are fine.
答案1
得分: 0
这不是Auth0,而是OAuth。实际上,这将更简单 - 在您的代码中只需两组凭据,而不是5组。如果您查看文档上的更新的快速入门指南,它会显示如何更改您的代码。基本上 - 迁移到新的凭据,并更新您的代码以在SDK中使用它。
现在我有点担心,因为我想分享我们文档的链接,但SO不喜欢那样做。嗯,核心指南在这里,https://developer.adobe.com/document-services/docs/overview/pdf-services-api/quickstarts/nodejs/,但以下是相关代码:
const credentials = PDFServicesSdk.Credentials
.servicePrincipalCredentialsBuilder()
.withClientId("PDF_SERVICES_CLIENT_ID")
.withClientSecret("PDF_SERVICES_CLIENT_SECRET")
.build();
基本上,只需更改客户端ID和客户端秘密。
英文:
it's not Auth0, but OAuth. And it's actually going to be far simpler - two credentials in your code versus 5. If you look at the updated quick starts on the docs it shows how to change your code. Basically - migrate to the new creds, and update your code to use it in the SDK.
Now I'm stressing because I want to share links to our docs, but SO doesn't like that. Um so the core guide is here, https://developer.adobe.com/document-services/docs/overview/pdf-services-api/quickstarts/nodejs/, but here's the relevant code:
const credentials = PDFServicesSdk.Credentials
.servicePrincipalCredentialsBuilder()
.withClientId("PDF_SERVICES_CLIENT_ID")
.withClientSecret("PDF_SERVICES_CLIENT_SECRET")
.build();
Basically, change the id and client secret.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论