Class: LHC::Auth
- Inherits:
-
Interceptor
show all
- Includes:
- ActiveSupport::Configurable
- Defined in:
- lib/lhc/interceptors/auth.rb
Instance Attribute Summary
Attributes inherited from Interceptor
#request
Instance Method Summary
collapse
Methods inherited from Interceptor
#after_request, #all_interceptor_classes, #before_response, dup, #initialize, #response
Instance Method Details
#after_response ⇒ Object
16
17
18
19
20
21
|
# File 'lib/lhc/interceptors/auth.rb', line 16
def after_response
return unless configuration_correct?
return unless reauthenticate?
reauthenticate!
end
|
#before_raw_request ⇒ Object
7
8
9
|
# File 'lib/lhc/interceptors/auth.rb', line 7
def before_raw_request
body_authentication! if auth_options[:body]
end
|
#before_request ⇒ Object
11
12
13
14
|
# File 'lib/lhc/interceptors/auth.rb', line 11
def before_request
bearer_authentication! if auth_options[:bearer]
basic_authentication! if auth_options[:basic]
end
|