Changeset 106
- Timestamp:
- 09/02/08 22:29:10 (2 years ago)
- Location:
- better_httpauth/trunk
- Files:
-
- 2 modified
-
lib/httpauth/digest.rb (modified) (2 diffs)
-
test/digest_credentials_test.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
better_httpauth/trunk/lib/httpauth/digest.rb
r88 r106 55 55 # for a WWW-Authenticate header (:challenge) or for a Authentication-Info header (:auth_info). 56 56 def encode_directives(h, variant) 57 encode = {:domain => :list_to_space_quoted_string, :algorithm => false, :stale => : str_to_bool, :nc => :int_to_hex}57 encode = {:domain => :list_to_space_quoted_string, :algorithm => false, :stale => :bool_to_str, :nc => :int_to_hex} 58 58 if [:credentials, :auth].include? variant 59 59 encode.merge! :qop => false … … 89 89 def decode_directives(directives, variant) 90 90 raise HTTPAuth::UnwellformedHeader.new("Can't decode directives which are nil") if directives.nil? 91 decode = {:domain => :space_quoted_string_to_list, :algorithm => false, :stale => : bool_to_str, :nc => :hex_to_int}91 decode = {:domain => :space_quoted_string_to_list, :algorithm => false, :stale => :str_to_bool, :nc => :hex_to_int} 92 92 if [:credentials, :auth].include? variant 93 93 decode.merge! :qop => false -
better_httpauth/trunk/test/digest_credentials_test.rb
r61 r106 79 79 :response=>"5e7bbe24dac88a1936edf1a89cae6168", 80 80 :cnonce=>"30b49be53eab919d", 81 :qop=>"auth" 81 :qop=>"auth", 82 :stale => false 82 83 assert credentials.validate({}) 83 84 end
