Class: Resourceful::PromiscuousBasicAuthenticator

Inherits:
BasicAuthenticator show all
Defined in:
lib/resourceful/promiscuous_basic_authenticator.rb

Overview

This class provides HTTP basic authentication without regard to the realm of receiving resource. This will send your username and password with any request made while it is in play.

Instance Method Summary collapse

Methods inherited from BasicAuthenticator

#add_credentials_to, #credentials, #update_credentials

Constructor Details

#initialize(username, password) ⇒ PromiscuousBasicAuthenticator

Returns a new instance of PromiscuousBasicAuthenticator.



6
7
8
# File 'lib/resourceful/promiscuous_basic_authenticator.rb', line 6

def initialize(username, password)
  super(nil, username, password)
end

Instance Method Details

#can_handle?(request) ⇒ Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/resourceful/promiscuous_basic_authenticator.rb', line 14

def can_handle?(request)
  true
end

#valid_for?(challenge_response) ⇒ Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/resourceful/promiscuous_basic_authenticator.rb', line 10

def valid_for?(challenge_response)
  true
end