Changeset 1869
- Timestamp:
- 07/01/07 00:40:30 (1 year ago)
- Files:
-
- trunk/lib/soap/httpconfigloader.rb (modified) (2 diffs)
- trunk/lib/soap/streamHandler.rb (modified) (1 diff)
- trunk/test/soap/auth (added)
- trunk/test/soap/auth/htdigest (added)
- trunk/test/soap/auth/htpasswd (added)
- trunk/test/soap/auth/test_basic.rb (added)
- trunk/test/soap/auth/test_digest.rb (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/soap/httpconfigloader.rb
r1824 r1869 41 41 set_basic_auth(client, basic_auth) 42 42 end 43 auth = options["auth"] ||= ::SOAP::Property.new 44 set_auth(client, auth) 45 auth.add_hook do |key, value| 46 set_auth(client, auth) 47 end 43 48 options.add_hook("connect_timeout") do |key, value| 44 49 client.connect_timeout = value … … 54 59 def set_basic_auth(client, basic_auth) 55 60 basic_auth.values.each do |ele| 56 if ele.is_a?(::Array) 57 url, userid, passwd = ele 58 else 59 url, userid, passwd = ele[:url], ele[:userid], ele[:password] 60 end 61 client.set_basic_auth(url, userid, passwd) 61 client.set_basic_auth(*authele_to_triplets(ele)) 62 62 end 63 end 64 65 def set_auth(client, auth) 66 auth.values.each do |ele| 67 client.set_auth(*authele_to_triplets(ele)) 68 end 69 end 70 71 def authele_to_triplets(ele) 72 if ele.is_a?(::Array) 73 url, userid, passwd = ele 74 else 75 url, userid, passwd = ele[:url], ele[:userid], ele[:password] 76 end 77 return url, userid, passwd 63 78 end 64 79 trunk/lib/soap/streamHandler.rb
r1868 r1869 196 196 ssl_config = @options["http.ssl_config"] 197 197 basic_auth = @options["http.basic_auth"] 198 auth = @options["http.auth"] 198 199 @options["http"].lock(true) 199 200 ssl_config.unlock 200 201 basic_auth.unlock 202 auth.unlock 201 203 end 202 204