Class: Netilion::Authentication

Inherits:
LHC::Interceptor
  • Object
show all
Defined in:
lib/netilion/authentication.rb

Instance Method Summary collapse

Instance Method Details

#before_requestObject



5
6
7
8
9
10
11
12
13
# File 'lib/netilion/authentication.rb', line 5

def before_request
  request.options[:auth] = {
    basic: {
      username: ::Netilion.config.username,
      password: ::Netilion.config.password
    }
  }
  request.headers['Api-Key'] = ::Netilion.config.api_key
end