Then you get an error that the token is invalid, because Dgraph does not strip bearer from the Authorization header.
{
"errors": [
{
"message": "mutation failed because authorization failed because unable to parse jwt token:token is malformed: tokenstring should not contain 'bearer '"
}
],
...
}
Ok, at present, the header should directly contain the JWT token without the Bearer part.
If you don’t want to use Authorization header for that purpose, because you may be using it for other places too, then you can use a custom header at present which just contains the JWT token.
We will add support for standard Authorization header parsing later.
@vvbalaji Any chance we could video conference for 15 minutes to help me get the testing in the /t folder working? Can’t seem to get the tests to find my cluster.
Or maybe there’s an internal doc somewhere you could point me to.
In the meantime, the first change in this diff is how I fixed the Bearer issue @abhimanyusinghgaur — might be easier than me getting je_malloc and my other build issues dealt with in order to create a PR.
@mrjn Indeed, appreciate any help… there’s issues with my local builds for testing with jemalloc and tagging images that I’m stymied on (can’t find any docs save the readme in the /t folder).
Note, I’m able to build the Docker images on my machine (OSX), it’s just those native builds that seem to be failing. With the dropping of OSX and Windows native support, maybe the tests should be converted to only use Docker images.
@abhimanyusinghgaur Sorry for the late reply (didn’t get the expected email notification). That looks good… glad you created it as it seems there were more places to touch. Thanks for getting this in!