24#ifndef HYRAX_GIT_S3CREDENTIALS_H
25#define HYRAX_GIT_S3CREDENTIALS_H
27#include "AccessCredentials.h"
34 static const std::string AWS_SESSION_TOKEN;
35 static const std::string AWS_TOKEN_EXPIRATION;
36 static const std::string BES_CONF_S3_ENDPOINT_KEY;
37 static const std::string BES_CONF_REFRESH_KEY;
38 static const std::string BES_CONF_URL_BASE;
41 time_t d_expiration_time;
43 std::string distribution_api_endpoint;
47 d_expiration_time(0), refresh_margin(600), distribution_api_endpoint(
"") {}
50 d_expiration_time(0), refresh_margin(refresh_margin), distribution_api_endpoint(credentials_endpoint) {}
54 time_t expires()
const {
55 return d_expiration_time;
58 bool needs_refresh()
const {
59 return (d_expiration_time - time(0)) < refresh_margin;
64 std::string
get(
const std::string &key);
std::string get(const std::string &key)
void get_temporary_credentials()
virtual bool is_s3_cred()
Do the URL, ID, Key amd Region items make up an S3 Credential?