I'm creating GPC clients for BigQuery & Transfer API, using GCP Java API. To each client I need to initiate different type of credentials -
GoogleCredential javadoc - for Transfer API
GoogleCredentials javadoc - for BigQuery
Is there a convenient way to convert between the two so I won't need to manage reading two types of credentials?
Also - could anyone reason why there was a need for these two types?
You can use a HttpCredentialsAdapter to use the more recent GoogleCredentials
with the Google API Client Libraries for Java.
I don't know of a way to do the reverse transformation, i.e., generate a GoogleCredential
from GoogleCredentials
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With