Authorization: Bearer {token}

With the graphql schema Authorization Provider config.

# Dgraph.Authorization {"VerificationKey":"","Header":"","Namespace":"","Algo":"","Audience":[]}

How would you specify to grab the jwt token from the Authorization header?

Auhtorizaion: Bearer {token}

You would need to specify the Header key as Authorization, like this:

# Dgraph.Authorization {"VerificationKey":"","Header":"Authorization","Namespace":"","Algo":"","Audience":[]}

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.