I'm clearly missing something obvious, but are the...
# squarelibraries
r
I'm clearly missing something obvious, but are there any examples of using a bearer token for auth with
wire
?
I've checked out https://stackoverflow.com/questions/49463607/create-bearer-authorization-header-in-okhttp-java but it doesn't seem like there is a method to straight add headers via the GrpcClient?
I'm working through building an
Authenticator
but I'm starting to feel like this is perhaps the wrong solution here as well
Apologies if this is a simple question, kind of drinking from the firehose here a bit and trying to get a minimal hacked solution up with our protos/backend
b
I don't know what a bearer token is, do you just need to pass it as a header?
I don't know if there are other ways but to pass a header with gRPC wire, you can either pass an interceptor or set the requestMetadata on the
GrpcStreamingCall
this worked btw, thanks again for the assist
b
Sweet
j
BTW you should also be able to use regular OkHttp interceptors