class UsernamePasswordCallCredentials(grpc.AuthMetadataPlugin):
def __init__(self, username):
self._username = username
def __call__(self, context, callback):
print "in __call__"
metadata = (('x-custom-auth-ticket', self._username),)
callback(metadata, None)
call_creds = metadata_call_credentials(UsernamePasswordCallCredentials("foo"))
channel = grpc.insecure_channel("localhost:50055")
stub = my_pb2_grpc.myStub(channel)
stub.ListUser(Empty(), credentials=call_creds)--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscribe@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/c5fd8d6d-f686-4e44-90e2-98e33fd8e75a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com.
Are SSL credentials supported by the python client yet?
IOW, if my client doescreds = grpc.ssl_channel_credentials(
root_certificates=ca.crt,
private_key=client.key,
certificate_chain=client.crt)how can the server access the client cert?