'HTTPS connection with RDFLib
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)?
Solution 1:[1]
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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | pseudosudo |