HTTPS与RDFLIB连接

发布于 2025-01-28 06:23:38 字数 156 浏览 5 评论 0原文

我正在使用Python和RDFLIB库,我想执行与SPARQL端点的HTTPS连接,例如Amazon Nepute(强制性HTTPS)并执行身份验证。但是,我在rdflib的文档中找不到有关身份验证方法与基本身份验证不同的任何描述,提示或示例。 RDFLIB是否支持其他身份验证方法(例如JWT)?

I am using Python and the RDFLib library and I want to perform an HTTPS connection to a SPARQL endpoint such as Amazon Nepute (HTTPS is mandatory) and perform authentication. However, I cannot find in the documentation of RDFLib any descriptions, hints or examples concerning authentication methods different than Basic Authentication. Does RDFLib support other authentication approaches (such as JWT)?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

冷夜 2025-02-04 06:23:38

sparqlstore 状态:

基础SparqlConnector使用Urllib库。执行HTTP调用时,将任何传递给SPARQLSTORE连接器传递给SPARQLSTORE连接器的任何额外的Kwargs将传递给Urllib。即,您对cookie/auth/thearers有完全控制。

因此,您可以使用Urllib单独验证,检索收到的Cookie/令牌,然后将其传递到RDFLIB中。

The documentation for SPARQLStore states:

The underlying SPARQLConnector uses the urllib library. Any extra kwargs passed to the SPARQLStore connector are passed to urllib when doing HTTP calls. I.e. you have full control of cookies/auth/headers.

So you could authenticate separately using urllib, retrieve the cookies/tokens received, and then pass them into RDFLib.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文