date: externalize the expiration code#15
Merged
Merged
Conversation
added 2 commits
October 1, 2018 12:00
Signed-off-by: Yoan Blanc <yoan.blanc@exoscale.ch>
Signed-off-by: Yoan Blanc <yoan.blanc@exoscale.ch>
Contributor
Author
|
this works, but it's superbly butt ugly to work around with utc and localtime to please cloudstack. |
pyr
approved these changes
Oct 5, 2018
| (if (>= expiration 0) | ||
| {:signatureVersion "3" | ||
| ;; XXX one day, cloudstack will be able to handle more formats | ||
| :expires (str (unparse-local (:date-time-no-ms formatters) |
Contributor
There was a problem hiding this comment.
this would be a bit more elegant if a custom formatter was used
Signed-off-by: Yoan Blanc <yoan.blanc@exoscale.ch>
Signed-off-by: Yoan Blanc <yoan.blanc@exoscale.ch>
Contributor
Author
% date
lun oct 8 09:04:35 CEST 2018With the default expiration value. {:page 1,
:pagesize 1,
:command listZones, :apikey EXO...,
:response json,
:signatureVersion 3,
:expires 2018-10-08T07:14:32+0000}
`` |
Signed-off-by: Yoan Blanc <yoan.blanc@exoscale.ch>
pyr
approved these changes
Oct 8, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This correctly produces...
{:page 1, :pagesize 1, :command listZones, :apikey EXOc94bc655ff901b7218a5c3cd, :response json, :signatureVersion 3, :expires 2018-10-01T10:12:19.174Z}but