com.google.api.ads.common.lib.auth
Class OAuth2Helper
java.lang.Object
com.google.api.ads.common.lib.auth.OAuth2Helper
public class OAuth2Helper
- extends Object
OAuth2 helper functions.
- Author:
- Adam Rogal
|
Method Summary |
com.google.api.client.auth.oauth2.Credential |
refreshCredential(com.google.api.client.auth.oauth2.Credential credential)
Refreshes the credential if within the refresh window. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OAuth2Helper
@Inject
public OAuth2Helper(AdsServiceLoggers adsServiceLoggers,
Long refreshWindowSeconds)
- Constructor.
- Parameters:
adsServiceLoggers - the loggersrefreshWindowSeconds - the refresh window in seconds
refreshCredential
public com.google.api.client.auth.oauth2.Credential refreshCredential(com.google.api.client.auth.oauth2.Credential credential)
throws IOException
- Refreshes the credential if within the refresh window.
- Throws:
IOException - if there was an problem refreshing the token
Copyright © 2012. All Rights Reserved.