private AccessToken getAccessToken ( ) throws IOException { // synchronize attempts to refresh the accessToken synchronized ( credentials ) { if ( needsRefresh ( credentials . getAccessToken ( ) ) ) { credentialRefresher . refresh ( credentials ) ; } } return credentials . getAccessToken ( ) ; }
Get an accessToken to use possibly refreshing the token if it expires within the minimumExpiryMillis .