mirror of https://github.com/apache/jclouds.git
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:
parent
e0ecf3aea1
commit
130921fc29
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue