Class: HTTPClient::AuthBase

Inherits:
Object
  • Object
show all
Includes:
Util
Defined in:
lib/httpclient/auth.rb

Overview

Authentication filter base class.

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#schemeObject (readonly)

Authentication scheme.



230
231
232
# File 'lib/httpclient/auth.rb', line 230

def scheme
  @scheme
end

Instance Method Details

#reset_challengeObject

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