Class: HTTPClient::AuthBase
- Inherits:
-
Object
- Object
- HTTPClient::AuthBase
- Includes:
- Util
- Defined in:
- lib/httpclient/auth.rb
Overview
Authentication filter base class.
Direct Known Subclasses
BasicAuth, DigestAuth, NegotiateAuth, OAuth, SSPINegotiateAuth
Instance Attribute Summary collapse
-
#scheme ⇒ Object
readonly
Authentication scheme.
Instance Method Summary collapse
-
#initialize(scheme) ⇒ AuthBase
constructor
A new instance of AuthBase.
-
#reset_challenge ⇒ Object
Resets challenge state.
Methods included from Util
#argument_to_hash, hash_find_value, #http?, #https?, #keyword_argument, try_require, uri_dirname, uri_part_of, urify, #warning
Constructor Details
#initialize(scheme) ⇒ AuthBase
Returns a new instance of AuthBase.
232 233 234 235 |
# File 'lib/httpclient/auth.rb', line 232 def initialize(scheme) @scheme = scheme @challenge = {} end |
Instance Attribute Details
#scheme ⇒ Object (readonly)
Authentication scheme.
230 231 232 |
# File 'lib/httpclient/auth.rb', line 230 def scheme @scheme end |
Instance Method Details
#reset_challenge ⇒ Object
Resets challenge state. Do not send ‘*Authorization’ header until the server sends ‘*Authentication’ again.
239 240 241 242 243 |
# File 'lib/httpclient/auth.rb', line 239 def reset_challenge synchronize do @challenge.clear end end |