@Provides @TimeStamp protected Long unixEpochTimestampProvider() { return System.currentTimeMillis() / 1000; /* convert to seconds */ }
@Inject public SignRequest(SignatureWire signatureWire, @org.jclouds.location.Provider Supplier<Credentials> creds, @TimeStamp Provider<String> timeStampProvider, Crypto crypto, HttpUtils utils) { this.signatureWire = signatureWire; this.creds = creds; this.timeStampProvider = timeStampProvider; this.crypto = crypto; this.utils = utils; }
@Provides @TimeStamp protected String provideTimeStamp(DateService dateService) { return dateService.iso8601DateFormat(new Date(System.currentTimeMillis())); }
@Override protected String provideTimeStamp(@TimeStamp Supplier<String> cache) { return "Thu, 05 Jun 2008 16:38:19 GMT"; } }
/** * borrowing concurrency code to ensure that caching takes place properly */ @Provides @TimeStamp Supplier<Long> provideTimeStampCache(@Named(PROPERTY_SESSION_INTERVAL) long seconds) { return Suppliers.memoizeWithExpiration(new Supplier<Long>() { public Long get() { return System.currentTimeMillis() / 1000; } }, seconds, TimeUnit.SECONDS); }
@Override protected String provideTimeStamp(@TimeStamp Supplier<String> cache) { return "Thu, 05 Jun 2008 16:38:19 GMT"; } }
@Provides @TimeStamp protected String provideTimeStamp(DateService dateService) { return dateService.rfc1123DateFormat(new Date(System.currentTimeMillis())); }
@Override protected String provideTimeStamp(@TimeStamp Supplier<String> cache) { return "2009-11-08T15:54:08.897Z"; } }
@Override protected String provideTimeStamp(@TimeStamp Supplier<String> cache) { return "2009-11-08T15:54:08.897Z"; } }
@Override protected String provideTimeStamp(@TimeStamp Supplier<String> cache) { return "2009-11-08T15:54:08.897Z"; } }
@Override protected String provideTimeStamp(@TimeStamp Supplier<String> cache) { return DEFAULT_DATE; } }
@Override protected Long provideTimeStamp(@TimeStamp Supplier<Long> cache) { return 1267243795L; } }
@Provides @Singleton @TimeStamp protected Supplier<Date> provideCacheBusterDate() { return memoizeWithExpiration(new Supplier<Date>() { public Date get() { return new Date(); } }, 1, TimeUnit.SECONDS); } }
@Inject public SharedKeyLiteAuthentication(SignatureWire signatureWire, @org.jclouds.location.Provider Supplier<Credentials> creds, @TimeStamp Provider<String> timeStampProvider, Crypto crypto, HttpUtils utils) { this.crypto = crypto; this.utils = utils; this.signatureWire = signatureWire; this.creds = creds; this.timeStampProvider = timeStampProvider; }
@Inject public RestAuthentication(@org.jclouds.location.Provider Supplier<Credentials> creds, @TimeStamp Provider<String> timeStampProvider, Crypto crypto) { this.creds = creds; this.timeStampProvider = timeStampProvider; this.crypto = crypto; }
@Override protected String provideTimeStamp(@TimeStamp Supplier<String> cache) { return "Thu, 05 Jun 2008 16:38:19 GMT"; } }
@Inject public ShareUrl(@Provider Supplier<Credentials> creds, @Provider Supplier<URI> provider, @TimeStamp javax.inject.Provider<Long> timeStampProvider, Crypto crypto) { this.creds = creds; this.provider = provider; this.timeStampProvider = timeStampProvider; this.crypto = crypto; }