From f91acf0258b3d40cbb31663e965669b7199be051 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Tue, 18 Dec 2007 21:14:07 +0000 Subject: 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 --- actionpack/lib/action_controller/http_authentication.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'actionpack/lib/action_controller/http_authentication.rb') 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) -- cgit v1.2.3