سؤال

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?

هل كانت مفيدة؟

المحلول

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

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top