0

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)?

giuseta
  • 117
  • 2
  • 15
  • HTTPS is not an authentication method so it is unclear what exactly you mean. For example, I can query any HTTPS exposed SPARQL endpoint without any issues, e.g. Wikidata or DBpedia – UninformedUser May 12 '22 at 17:14
  • You are right, my question was really ill posed. I've edited it. Long story short, I would like to know the authentication method supported by RDFLib – giuseta May 13 '22 at 09:03
  • Can you provide the code that you currently have written? It would help understand which features of RDFLib you're using to do this. – Thomas May 15 '22 at 23:57

1 Answers1

0

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.

pseudosudo
  • 6,270
  • 9
  • 40
  • 53