> // since the session interval is also the token expiration time
> requested to the server make the token expire a
> // bit before the deadline to make sure there aren't session
> expiration exceptions
> - sessionIntervalInSeconds = sessionIntervalInSeconds > 30 ?
> sessionIntervalInSeconds - 30 :
> - sessionIntervalInSeconds;
> - return
> CacheBuilder.newBuilder().expireAfterWrite(sessionIntervalInSeconds,
> TimeUnit.SECONDS).build(CacheLoader
> - .from(getAccess));
> + expirationSeconds = expirationSeconds > 30 ? expirationSeconds - 30 :
> expirationSeconds;
> + return CacheBuilder.newBuilder().expireAfterWrite(expirationSeconds,
> SECONDS).build(CacheLoader.from(getAccess));
> + }
> +
> + /**
> + * Defers instantiation of {@linkplain SignOrProduceMacForToken} so as to
> avoid requiring private keys when the alg
> + * is set to {@linkplain org.jclouds.oauth.v2.JWSAlgorithms#NONE}.
Nice!
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/90/files#r20220490