public class OAuth2Helper extends Object
Constructor and Description |
---|
OAuth2Helper(org.slf4j.Logger libLogger,
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(org.slf4j.Logger libLogger, Long refreshWindowSeconds)
libLogger
- the lib loggerrefreshWindowSeconds
- 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 © 2018. All Rights Reserved.