aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource/lib/active_resource/base.rb
diff options
context:
space:
mode:
authorpivotal <pivotal@shotwell.flood.pivotallabs.com>2009-10-02 13:57:31 -0700
committerMichael Koziarski <michael@koziarski.com>2009-10-15 10:37:04 +1300
commit945d999aadc9df41487e675fa0a863396cb54e31 (patch)
treeaa13a8a177c9615f28430440342b4dd145804ca0 /activeresource/lib/active_resource/base.rb
parent1d01bad3cedfd690c6d125cac6d4504baa9409e5 (diff)
downloadrails-945d999aadc9df41487e675fa0a863396cb54e31.tar.gz
rails-945d999aadc9df41487e675fa0a863396cb54e31.tar.bz2
rails-945d999aadc9df41487e675fa0a863396cb54e31.zip
Digest auth option for ActiveResource.
Signed-off-by: Michael Koziarski <michael@koziarski.com>
Diffstat (limited to 'activeresource/lib/active_resource/base.rb')
-rw-r--r--activeresource/lib/active_resource/base.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/activeresource/lib/active_resource/base.rb b/activeresource/lib/active_resource/base.rb
index b21d8db613..ae627c365d 100644
--- a/activeresource/lib/active_resource/base.rb
+++ b/activeresource/lib/active_resource/base.rb
@@ -326,6 +326,17 @@ module ActiveResource
@password = password
end
+ def auth_type
+ if defined?(@auth_type)
+ @auth_type
+ end
+ end
+
+ def auth_type=(auth_type)
+ @connection = nil
+ @auth_type = auth_type
+ end
+
# Sets the format that attributes are sent and received in from a mime type reference:
#
# Person.format = :json
@@ -397,6 +408,7 @@ module ActiveResource
@connection.proxy = proxy if proxy
@connection.user = user if user
@connection.password = password if password
+ @connection.auth_type = auth_type if auth_type
@connection.timeout = timeout if timeout
@connection.ssl_options = ssl_options if ssl_options
@connection