Module: RapidApi::Auth::Concerns::SessionsController::ClassMethods

Defined in:
lib/rapid_api/auth/concerns/sessions_controller.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#auth_paramsObject

Returns the value of attribute auth_params.



30
31
32
# File 'lib/rapid_api/auth/concerns/sessions_controller.rb', line 30

def auth_params
  @auth_params
end

#auth_procObject

Returns the value of attribute auth_proc.



30
31
32
# File 'lib/rapid_api/auth/concerns/sessions_controller.rb', line 30

def auth_proc
  @auth_proc
end

#responds_with_procObject

Returns the value of attribute responds_with_proc.



30
31
32
# File 'lib/rapid_api/auth/concerns/sessions_controller.rb', line 30

def responds_with_proc
  @responds_with_proc
end

Instance Method Details

#authenticates_with(*params, &block) ⇒ Object



36
37
38
39
# File 'lib/rapid_api/auth/concerns/sessions_controller.rb', line 36

def authenticates_with(*params, &block)
  define_method :_authenticate, &block
  [*params].each { |p| self.auth_params << p }
end

#responds_with(&block) ⇒ Object



41
42
43
# File 'lib/rapid_api/auth/concerns/sessions_controller.rb', line 41

def responds_with(&block)
  define_method :_authentication_response_json, &block
end