public class OAuth2Helper extends Object
Constructor and Description |
---|
OAuth2Helper(AdsServiceLoggers adsServiceLoggers,
Long refreshWindowSeconds)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
com.google.api.client.auth.oauth2.Credential |
refreshCredential(com.google.api.client.auth.oauth2.Credential credential)
Refreshes the credential if within the refresh window.
|
@Inject public OAuth2Helper(AdsServiceLoggers adsServiceLoggers, Long refreshWindowSeconds)
adsServiceLoggers
- the loggersrefreshWindowSeconds
- the refresh window in secondspublic com.google.api.client.auth.oauth2.Credential refreshCredential(com.google.api.client.auth.oauth2.Credential credential) throws IOException
IOException
- if there was an problem refreshing the tokenCopyright © 2013. All Rights Reserved.