Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
使用 Wallet Objects Java 客户端库,GoogleCredential 对象是否可以在整个应用程序生命周期内重复使用,还是仅用于 1 次?
GoogleCredential 对象旨在在应用程序生命周期内重复使用。它将透明地为您处理存储身份验证令牌和更新过期令牌。要显式请求新的访问令牌,您可以使用以下命令刷新它:
credential.refreshToken();
并得到它
credential.getAccessToken();