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, #before_raw_request, #before_response, dup, #initialize, #response

Constructor Details

This class inherits a constructor from LHC::Interceptor

Instance Method Details

#after_responseObject



11
12
13
14
15
# File 'lib/lhc/interceptors/auth.rb', line 11

def after_response
  return unless configuration_correct?
  return unless reauthenticate?
  reauthenticate!
end

#before_requestObject



7
8
9
# File 'lib/lhc/interceptors/auth.rb', line 7

def before_request
  authenticate!
end