Question

With the Wallet Objects Java client library, can the GoogleCredential object be reused throughout the application lifetime, or is it intended for 1-time use?

Était-ce utile?

La solution

The GoogleCredential object is intended to be reused for the application lifetime. It will transparently handle storing auth tokens and renewing expired tokens for you. To explicitly request a new access token you can refresh it with:

credential.refreshToken();

and get it with

credential.getAccessToken();

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top