aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2012-01-02 11:54:00 -0800
committerJosé Valim <jose.valim@gmail.com>2012-01-02 11:54:00 -0800
commit44df252382cc2301364495ff65563d23bcc1b070 (patch)
treef3dcb38780d337fafde11f4e758f27c54136059b /actionpack/lib
parentdeaa68281c3737e03227aa127646c04acaa21eb6 (diff)
parent0f2f8003d2351079ce6ec0e706e474d8024839cc (diff)
downloadrails-44df252382cc2301364495ff65563d23bcc1b070.tar.gz
rails-44df252382cc2301364495ff65563d23bcc1b070.tar.bz2
rails-44df252382cc2301364495ff65563d23bcc1b070.zip
Merge pull request #4252 from lest/deprecate-activesupport-base64
remove ActiveSupport::Base64 in favor of ::Base64
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_controller/metal/http_authentication.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/lib/action_controller/metal/http_authentication.rb b/actionpack/lib/action_controller/metal/http_authentication.rb
index 594ba7a7b8..09ff376a91 100644
--- a/actionpack/lib/action_controller/metal/http_authentication.rb
+++ b/actionpack/lib/action_controller/metal/http_authentication.rb
@@ -141,11 +141,11 @@ module ActionController
end
def decode_credentials(request)
- ActiveSupport::Base64.decode64(request.authorization.split(' ', 2).last || '')
+ ::Base64.decode64(request.authorization.split(' ', 2).last || '')
end
def encode_credentials(user_name, password)
- "Basic #{ActiveSupport::Base64.strict_encode64("#{user_name}:#{password}")}"
+ "Basic #{::Base64.strict_encode64("#{user_name}:#{password}")}"
end
def authentication_request(controller, realm)
@@ -289,7 +289,7 @@ module ActionController
t = time.to_i
hashed = [t, secret_key]
digest = ::Digest::MD5.hexdigest(hashed.join(":"))
- ActiveSupport::Base64.strict_encode64("#{t}:#{digest}")
+ ::Base64.strict_encode64("#{t}:#{digest}")
end
# Might want a shorter timeout depending on whether the request
@@ -298,7 +298,7 @@ module ActionController
# allow a user to use new nonce without prompting user again for their
# username and password.
def validate_nonce(secret_key, request, value, seconds_to_timeout=5*60)
- t = ActiveSupport::Base64.decode64(value).split(":").first.to_i
+ t = ::Base64.decode64(value).split(":").first.to_i
nonce(secret_key, t) == value && (t - Time.now.to_i).abs <= seconds_to_timeout
end