-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to add Channel Credentials? #84
Comments
grpclib currently has only basic building blocks to perform authentication. Vendor-specific auth mechanisms (Google) aren't supported because I'm not using these services and I don't know the best way to implement this functionality. If you want to use certificate-based auth – use ssl option when create Channel:
This If you want to use token-based auth – make sure you're using secure connection (
Can you provide an example of how to authenticate with Google using existing functionality in grpclib I mentioned above? Maybe I can add more helpers into grpclib and/or document this properly with examples. |
I'm trying to use the auth token method. However with and without a token I get the following error Proto File - which I have regenerated using the
|
Turns out that Google detects gRPC protocol by reading content-type header:
But gRPC protocol says that both variants are valid: https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md Unfortunately grpclib doesn't allow you to set your custom content-type header value. |
I currently have the following code:
This doesn't work as this returns a composite ChannelCredentials object as per https://www.grpc.io/docs/guides/auth/ . Is this currently supported? Or should I try to get the headers required for authenticating requests to google?
The text was updated successfully, but these errors were encountered: