_get_token_expiration in auth_token.py should return isotime

Bug #1413093 reported by wanghong on 2015-01-21
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
keystonemiddleware
Low
wanghong

Bug Description

Currently, _get_token_expiration method returns a normalized time, at the same time, _confirm_token_not_expired method returns an isotime, refer to: https://github.com/openstack/keystonemiddleware/blob/master/keystonemiddleware/auth_token.py#L405, https://github.com/openstack/keystonemiddleware/blob/master/keystonemiddleware/auth_token.py#L414. We will cache the expire time returned by the two methods in the _TokenCache object. But _TokenCache object treats it as an isotime when getting cache, refer to: https://github.com/openstack/keystonemiddleware/blob/master/keystonemiddleware/auth_token.py#L1877. I think _get_token_expiration should return isotime too.

wanghong (w-wanghong) on 2015-01-21
Changed in keystonemiddleware:
assignee: nobody → wanghong (w-wanghong)
Changed in keystonemiddleware:
assignee: wanghong (w-wanghong) → Morgan Fainberg (mdrnstm)
status: New → In Progress
Changed in keystonemiddleware:
importance: Undecided → Low
status: In Progress → Triaged
Changed in keystonemiddleware:
assignee: Morgan Fainberg (mdrnstm) → Steve Martinelli (stevemar)
status: Triaged → In Progress
Changed in keystonemiddleware:
assignee: Steve Martinelli (stevemar) → wanghong (w-wanghong)

Reviewed: https://review.openstack.org/140984
Committed: https://git.openstack.org/cgit/openstack/keystonemiddleware/commit/?id=30c4794c37a2ee0d5e194465dac2c7043c62a7f9
Submitter: Jenkins
Branch: master

commit 30c4794c37a2ee0d5e194465dac2c7043c62a7f9
Author: wanghong <email address hidden>
Date: Thu Dec 11 16:59:53 2014 +0800

    iso expires should be returned in one place

    Currently, _get_token_expiration method returns a normalized time,
    at the same time, _confirm_token_not_expired method returns an isotime.
    We will cache the expire time returned by the two methods in the
    _TokenCache object. But _TokenCache object treats it as an isotime when
    getting cache.
    There are two issues here:
    1. _get_token_expiration should return isotime too
    2. expires should be returned in one place rather than in two places
    which is a gap make expires in different time-forms

    Closes-Bug: #1413093
    Change-Id: I85dbaaed0c761ff2f4bcc960df94a4e106af1730

Changed in keystonemiddleware:
status: In Progress → Fix Committed
Changed in keystonemiddleware:
milestone: none → 1.4.0
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers