Solved, using:

grpc::SslCredentials()
grpc::ServiceAccountJWTAccessCredentials()
grpc::CompositeChannelCredentials()

A composite credential can be done using the JSON data loaded from file.

thanks.
 

On Wednesday, April 17, 2019 at 1:11:42 PM UTC+2, [email protected] wrote:
>
> Hi,
>
> Is there a way (with C++) to use GoogleDefaultCredentials without using 
> the GOOGLE_APPLICATION_CREDENTIALS env var, but using a filepath, or any 
> other method ?
>
> Im trying to create multiple gRPC channels, each one with one diferent 
> credential file. Im doing it now changing by code the previous env var, but 
> it doesnt work well.
>
>
> P.D: seems like other languages, like Go, allow this posibility:
>
>    perRPC, _ := oauth.NewServiceAccountFromFile("service-account.json", scope)
>
>
>
> Thanks!
>
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
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/93b1441c-1fda-4a97-8686-241195d8d0e0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to