Reduce HP Cloud authentication token timeout

I see a 12 hour expiry when requesting a new authentication token.
Reducing this timeout should not hurt in any case.
This commit is contained in:
Andrew Gaul 2012-08-15 17:44:55 -07:00 committed by Andrew Gaul
parent e0ecf3aea1
commit 130921fc29
1 changed files with 2 additions and 2 deletions

View File

@ -186,11 +186,11 @@ public class KeystoneAuthenticationModule extends AbstractModule {
} }
// TODO: what is the timeout of the session token? modify default accordingly // TODO: what is the timeout of the session token? modify default accordingly
// PROPERTY_SESSION_INTERVAL is default to 60 seconds, but we have this here at 23 hours for now. // PROPERTY_SESSION_INTERVAL is default to 60 seconds, but we have this here at 11 hours for now.
@Provides @Provides
@Singleton @Singleton
public LoadingCache<Credentials, Access> provideAccessCache(Function<Credentials, Access> getAccess) { public LoadingCache<Credentials, Access> provideAccessCache(Function<Credentials, Access> getAccess) {
return CacheBuilder.newBuilder().expireAfterWrite(23, TimeUnit.HOURS).build(CacheLoader.from(getAccess)); return CacheBuilder.newBuilder().expireAfterWrite(11, TimeUnit.HOURS).build(CacheLoader.from(getAccess));
} }
// Temporary conversion of a cache to a supplier until there is a single-element cache // Temporary conversion of a cache to a supplier until there is a single-element cache