Merge "Correct format for token expiration time"
This commit is contained in:
commit
7ecd4ca287
@ -6398,6 +6398,7 @@ class ApplicationCredentialAuth(test_v3.RestfulTestCase):
|
||||
resp = self.v3_create_token(
|
||||
auth_data, expected_status=http.client.CREATED
|
||||
)
|
||||
self.assertValidTokenResponse(resp)
|
||||
token = resp.headers.get('X-Subject-Token')
|
||||
future = timeutils.utcnow() + datetime.timedelta(minutes=2)
|
||||
with freezegun.freeze_time(future):
|
||||
|
@ -315,11 +315,13 @@ class Manager(manager.Manager):
|
||||
if (app_cred['expires_at'] is not None) and (
|
||||
token_time > app_cred['expires_at']
|
||||
):
|
||||
token.expires_at = app_cred['expires_at'].isoformat()
|
||||
token.expires_at = utils.isotime(
|
||||
app_cred['expires_at'], subsecond=True
|
||||
)
|
||||
LOG.debug(
|
||||
'Resetting token expiration to the application'
|
||||
' credential expiration: %s',
|
||||
app_cred['expires_at'].isoformat(),
|
||||
token.expires_at,
|
||||
)
|
||||
|
||||
token_id, issued_at = self.driver.generate_id_and_issued_at(token)
|
||||
|
Loading…
Reference in New Issue
Block a user