From 476937bc6099b70e8901177945cad92251fcdc69 Mon Sep 17 00:00:00 2001 From: Liang Tao Date: Wed, 26 Mar 2014 14:40:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E5=AF=B9ak/sk=E7=9A=84?= =?UTF-8?q?=E4=BC=A0=E5=8F=82=EF=BC=8C=E4=BB=8D=E7=84=B6=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E5=85=A8=E5=B1=80=E8=AE=BE=E5=AE=9A=E5=80=BC=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/qiniu/auth.rb | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/lib/qiniu/auth.rb b/lib/qiniu/auth.rb index 8f7a86e..c286bfe 100755 --- a/lib/qiniu/auth.rb +++ b/lib/qiniu/auth.rb @@ -26,15 +26,8 @@ module Qiniu ### 生成下载授权URL def authorize_download_url(url, args = EMPTY_ARGS) ### 提取AK/SK信息 - access_key = args[:access_key] - if access_key.nil? then - access_key = Config.settings[:access_key] - end - - secret_key = args[:secret_key] - if secret_key.nil? then - secret_key = Config.settings[:secret_key] - end + access_key = Config.settings[:access_key] + secret_key = Config.settings[:secret_key] ### 授权期计算 if args[:expires].is_a?(Integer) && args[:expires] > 0 then