Frage

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?

War es hilfreich?

Lösung

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();

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top