Sha256: 6ada63f0b18f165156361f3f36f306bdd9513b31a7b84ec4a62c8d6701e403bf

Contents?: true

Size: 690 Bytes

Versions: 13

Compression:

Stored size: 690 Bytes

Contents

class Rosemary::BasicAuthClient < Rosemary::Client

  # The username to be used to authenticate the user against the OMS API
  attr_reader :username

  # The password to be used to authenticate the user against the OMS API
  attr_reader :password

  def initialize(username, password)
    @username = username
    @password = password
  end

  # The username and password credentials as a Hash
  # @return [Hash] the credential hash.
  def credentials
    {:username => username, :password => password}
  end

  # Override inspect message to keep the password from showing up
  # in any logfile.
  def inspect
    "#<#{self.class.name}:#{self.object_id} @username='#{username}'>"
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
rosemary-0.4.4 lib/rosemary/basic_auth_client.rb
rosemary-0.4.3 lib/rosemary/basic_auth_client.rb
rosemary-0.4.2 lib/rosemary/basic_auth_client.rb
rosemary-0.4.1 lib/rosemary/basic_auth_client.rb
rosemary-0.4.0 lib/rosemary/basic_auth_client.rb
rosemary-0.3.12 lib/rosemary/basic_auth_client.rb
rosemary-0.3.11 lib/rosemary/basic_auth_client.rb
rosemary-0.3.10 lib/rosemary/basic_auth_client.rb
rosemary-0.3.9 lib/rosemary/basic_auth_client.rb
rosemary-0.3.8 lib/rosemary/basic_auth_client.rb
rosemary-0.3.7 lib/rosemary/basic_auth_client.rb
rosemary-0.3.6 lib/rosemary/basic_auth_client.rb
rosemary-0.3.5 lib/rosemary/basic_auth_client.rb