You can translate the question and the replies:

GraphQL service - passing credentials for Basic Auth

Hi Team, We were trying to use GraphQL service using an IDE something like GraphQL Playground, however, were unsure how to pass connection details into the header for basic authentication. By looking at Denodo's documentation you specify that - '' In HTTP Basic the Denodo user name and password are passed as unencrypted base64 encoded text with an Authorization HTTP request header. Denodo GraphQL basic authentication example¶ <username>:<password> -> Authorization: Basic YWRtaW46YWRtaW4= '' Could you please provide a more clear example how exactly I should be passing these parameters in http header in GraphQL playground? For admin database, user = admin(psw= admin). Many Thanks! Paul
user
05-07-2021 06:56:45 -0400

1 Answer

Hi, I am able to query the Denodo GraphQL Service through GraphQL Playground by opening the HTTP Headers tab and providing a header like : `{"authorization" : "Basic <encoded username:password>"}` Where the <username>:<password> is encoded in Base64. There are several tools you can use to perform this encoding, for instance([base64encode.org](https://www.base64encode.org/)). As an example, admin:admin will encode to YWRtaW46YWRtaW4= . So to query this service with the default admin user, I would provide the HTTP Header : `{"authorization" : "Basic YWRtaW46YWRtaW4="}` Note that in GraphQL Playground, capitalizing the "authorization" can cause the Server to not be reached. Hope this helps!
Denodo Team
09-07-2021 12:29:33 -0400
You must sign in to add an answer. If you do not have an account, you can register here