class Aws::Sigv4::Signer
def presigned_url_expiration(options, expiration, datetime)
def presigned_url_expiration(options, expiration, datetime) expires_in = extract_expires_in(options) return expires_in unless expiration expiration_seconds = (expiration - datetime).to_i # In the static stability case, credentials may expire in the past # but still be valid. For those cases, use the user configured # expires_in and ingore expiration. if expiration_seconds <= 0 expires_in else [expires_in, expiration_seconds].min end end