rgw: make rgw::keystone::TokenEnvelope::expired() to be const-correct.

Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
This commit is contained in:
Radoslaw Zarzynski 2017-01-06 14:15:54 +01:00
parent a16d301626
commit c777810e32

View File

@ -196,9 +196,9 @@ public:
const std::string& get_user_id() const {return user.id;};
const std::string& get_user_name() const {return user.name;};
bool has_role(const string& r) const;
bool expired() {
uint64_t now = ceph_clock_now().sec();
return (now >= (uint64_t)get_expires());
bool expired() const {
const uint64_t now = ceph_clock_now().sec();
return now >= static_cast<uint64_t>(get_expires());
}
int parse(CephContext* cct,
const std::string& token_str,