aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/http_authentication.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-12-18 21:14:07 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-12-18 21:14:07 +0000
commitf91acf0258b3d40cbb31663e965669b7199be051 (patch)
treea5a1caabd8c681b459360d92b7b62bf665c9a1eb /actionpack/lib/action_controller/http_authentication.rb
parent2bdac92dcf8caf9e2b45796f8af56da6a293d722 (diff)
downloadrails-f91acf0258b3d40cbb31663e965669b7199be051.tar.gz
rails-f91acf0258b3d40cbb31663e965669b7199be051.tar.bz2
rails-f91acf0258b3d40cbb31663e965669b7199be051.zip
Ruby 1.9 compat: move from the deprecated Base64 module to ActiveSupport::Base64. Closes #10554.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8433 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller/http_authentication.rb')
-rw-r--r--actionpack/lib/action_controller/http_authentication.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/actionpack/lib/action_controller/http_authentication.rb b/actionpack/lib/action_controller/http_authentication.rb
index 18a503c3ad..cd81c24e8b 100644
--- a/actionpack/lib/action_controller/http_authentication.rb
+++ b/actionpack/lib/action_controller/http_authentication.rb
@@ -1,5 +1,3 @@
-require 'base64'
-
module ActionController
module HttpAuthentication
# Makes it dead easy to do HTTP Basic authentication.
@@ -110,11 +108,11 @@ module ActionController
end
def decode_credentials(request)
- Base64.decode64(authorization(request).split.last || '')
+ ActiveSupport::Base64.decode64(authorization(request).split.last || '')
end
def encode_credentials(user_name, password)
- "Basic #{Base64.encode64("#{user_name}:#{password}")}"
+ "Basic #{ActiveSupport::Base64.encode64("#{user_name}:#{password}")}"
end
def authentication_request(controller, realm)