Expires time is calculated twice when using expires_in and can cause signature authentication problems #54

Open
wants to merge 2 commits into
from
Jump to file or symbol
Failed to load files and symbols.
+2 −2
Split
@@ -115,7 +115,7 @@ def initialize(*args)
# 3) The current time in seconds since the epoch plus the default number of seconds (60 seconds)
def expires
return options[:expires] if options[:expires]
- date.to_i + expires_in
+ @expires ||= date.to_i + expires_in
end
def expires_in
@@ -218,4 +218,4 @@ def only_path
end
end
end
-end
+end