gazuntype / graphQL-client-unity

This repository houses a unitypackage that can be included in your Unity Project to enable it communicate with a graphQL server.
Apache License 2.0
292 stars 50 forks source link

Authentication Bearer #4

Closed emorling closed 5 years ago

emorling commented 5 years ago

Do we need to implement Authentication Bearer, or this part of the lib?

gazuntype commented 5 years ago

Hey Emorling. The Authentication Bearer is part of the library. Just ensure the static variable auth in set to the value of the token.

gazuntype commented 5 years ago

So therefore, setting GraphQuery.auth to the token you want to use for authentication, sets the authorization header in the request to the token.

emorling commented 5 years ago

GraphQuery doesn't seem to have a variable named auth?

GraphQuery.auth = 'MY_TOKEN';

emorling commented 5 years ago

I see there is a authToken variable in the script in the repo. But It's not included in the .unitypackage?

gazuntype commented 5 years ago

Oh wow. That's a terrible mistake on my part. I added authentication fairly recently so I think I forgot to re-export the unitypackage. I'll do that today.

gazuntype commented 5 years ago

Done.