Hi,
I am trying to integrate AWS Cognito authentication in GraphQl schema.
I have added this line to the bottom of my graphql schema
# Dgraph.Authorization {"VerificationKey":"","Header":"Bearer", "jwkurl":"https://cognito-idp.<conito_region>.amazonaws.com/<cognito_user_pool_id>/.well-known/jwks.json", "Namespace":"default","Algo":"","Audience":["<cognito_api_name>", "<app_client_id"], "ClosedByDefault": true}
here is my curl request (I have obtained valid token):
curl --location --request POST 'localhost:8082/graphql' \
--header 'Authorization: Bearer <obtained_valid_token>' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"query {\n getCommercial (id: \"0x2718\") {\n id\n name\n \n }\n}","variables":{}}'
and I got error response:
{
"errors": [
{
"message": "couldn't rewrite query getCommercial because a valid JWT is required but was not provided",
"path": [
"getCommercial"
]
}
]
}
}
What I am doing wrong here, and how to better trace an errors, since I do not have any logs conserning authorisatin from the dgraph docker containers?