class Mechanize::HTTP::AuthChallenge
A parsed WWW-Authenticate header
Attributes
The authentication parameters
The authentication scheme
Public Instance Methods
Source
# File lib/mechanize/http/auth_challenge.rb, line 32 def [] param params[param] end
Retrieves param
from the params list
Source
# File lib/mechanize/http/auth_challenge.rb, line 22
Creates a new AuthChallenge
header with the given scheme and parameters
Source
# File lib/mechanize/http/auth_challenge.rb, line 39 def realm uri case scheme when 'Basic' then raise ArgumentError, "provide uri for Basic authentication" unless uri Mechanize::HTTP::AuthRealm.new scheme, uri + '/', self['realm'] when 'Digest' then Mechanize::HTTP::AuthRealm.new scheme, uri + '/', self['realm'] else raise Mechanize::Error, "unknown HTTP authentication scheme #{scheme}" end end
Constructs an AuthRealm
for this challenge
Source
# File lib/mechanize/http/auth_challenge.rb, line 54 def realm_name params['realm'] if Hash === params # NTLM has a string for params end
The name of the realm for this challenge