Class: SourceMonitor::Configuration::AuthenticationSettings

Inherits:
Object
  • Object
show all
Defined in:
lib/source_monitor/configuration/authentication_settings.rb

Defined Under Namespace

Classes: Handler

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeAuthenticationSettings

Returns a new instance of AuthenticationSettings.



27
28
29
# File 'lib/source_monitor/configuration/authentication_settings.rb', line 27

def initialize
  reset!
end

Instance Attribute Details

#authenticate_handlerObject (readonly)

Returns the value of attribute authenticate_handler.



24
25
26
# File 'lib/source_monitor/configuration/authentication_settings.rb', line 24

def authenticate_handler
  @authenticate_handler
end

#authorize_handlerObject (readonly)

Returns the value of attribute authorize_handler.



24
25
26
# File 'lib/source_monitor/configuration/authentication_settings.rb', line 24

def authorize_handler
  @authorize_handler
end

#current_user_methodObject

Returns the value of attribute current_user_method.



25
26
27
# File 'lib/source_monitor/configuration/authentication_settings.rb', line 25

def current_user_method
  @current_user_method
end

#user_signed_in_methodObject

Returns the value of attribute user_signed_in_method.



25
26
27
# File 'lib/source_monitor/configuration/authentication_settings.rb', line 25

def user_signed_in_method
  @user_signed_in_method
end

Instance Method Details

#authenticate_with(handler = nil, &block) ⇒ Object



31
32
33
# File 'lib/source_monitor/configuration/authentication_settings.rb', line 31

def authenticate_with(handler = nil, &block)
  @authenticate_handler = build_handler(handler, &block)
end

#authorize_with(handler = nil, &block) ⇒ Object



35
36
37
# File 'lib/source_monitor/configuration/authentication_settings.rb', line 35

def authorize_with(handler = nil, &block)
  @authorize_handler = build_handler(handler, &block)
end

#reset!Object



39
40
41
42
43
44
# File 'lib/source_monitor/configuration/authentication_settings.rb', line 39

def reset!
  @authenticate_handler = nil
  @authorize_handler = nil
  @current_user_method = nil
  @user_signed_in_method = nil
end