Skip to content

Commit

Permalink
Update for new resourceful header style
Browse files Browse the repository at this point in the history
  • Loading branch information
paul committed Oct 7, 2009
1 parent 0eff8fa commit 6e9a49e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/ssbe_authenticator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def initialize(username, password)

def update_credentials(challenge_response)
@domain = Addressable::URI.parse(challenge_response.uri).host
@challenge = HTTPAuth::Digest::Challenge.from_header(challenge_response.header['WWW-Authenticate'].first)
@challenge = HTTPAuth::Digest::Challenge.from_header(challenge_response.header['WWW-Authenticate'].join(", "))
end

def valid_for?(challenge_response)
Expand All @@ -25,7 +25,8 @@ def valid_for?(challenge_response)
rescue HTTPAuth::UnwellformedHeader
return false
end
challenge.realm == @realm
#challenge.realm == @realm
true
end

def can_handle?(request)
Expand Down

0 comments on commit 6e9a49e

Please sign in to comment.