Class: ApipieBindings::Authenticators::BasicAuth

Inherits:
Base
  • Object
show all
Defined in:
lib/apipie_bindings/authenticators/basic_auth.rb

Direct Known Subclasses

BasicAuthExternal

Instance Attribute Summary

Attributes inherited from Base

#auth_cookie

Instance Method Summary collapse

Methods inherited from Base

#error, #name, #response

Constructor Details

#initialize(user, password) ⇒ BasicAuth

Returns a new instance of BasicAuth.



6
7
8
9
# File 'lib/apipie_bindings/authenticators/basic_auth.rb', line 6

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

Instance Method Details

#authenticate(request, args) ⇒ Object



11
12
13
# File 'lib/apipie_bindings/authenticators/basic_auth.rb', line 11

def authenticate(request, args)
  request.basic_auth(@user, @password)
end