Can anyone tell me how I should programmatically construct an authentication request in GraphDB? In other systems I have made a basic authentication request by appending a base64-encoded username and password onto the string "Basic ". It seems different in GraphDB; when I have done an authentication using the example (here: [server]/webapi) I see a string like this:
GDB eyJ1c2VybmFtZSI6ImFkbWluIiwiYXV0aGVudGljYXRlZEF0IjoxNzMyNzg3MDMyMDkyfQ==.iTPgyRG8ixE4VnPNJarCRepf6JletXq+WblC1BV83CQ=
This base64-decodes to something like this:
{"username":"admin","authenticatedAt":1732787032092}
I can see why this is sensible; I'd just like to know how to build it.
Can anyone tell me how I should programmatically construct an authentication request in GraphDB? In other systems I have made a basic authentication request by appending a base64-encoded username and password onto the string "Basic ". It seems different in GraphDB; when I have done an authentication using the example (here: [server]/webapi) I see a string like this:
GDB eyJ1c2VybmFtZSI6ImFkbWluIiwiYXV0aGVudGljYXRlZEF0IjoxNzMyNzg3MDMyMDkyfQ==.iTPgyRG8ixE4VnPNJarCRepf6JletXq+WblC1BV83CQ=
This base64-decodes to something like this:
{"username":"admin","authenticatedAt":1732787032092}
I can see why this is sensible; I'd just like to know how to build it.
Share Improve this question asked Nov 28, 2024 at 10:23 Ian PiperIan Piper 951 silver badge10 bronze badges1 Answer
Reset to default 2Well I found what I needed in the documentation.
https://graphdb.ontotext/documentation/10.8/access-control.html#basic-authentication
It looks like the REST API methods support Basic authentication as well as GDB, so I could just log in the same way that I do in other systems. I still don't know what I would do if I was forced to use GDB authentication, but I'm happy that it works using methods that I know.