Class: CASinoCore::Settings

Inherits:
Object
  • Object
show all
Defined in:
lib/casino_core/settings.rb

Constant Summary collapse

DEFAULT_SETTINGS =
{
  login_ticket: {
    lifetime: 600
  },
  ticket_granting_ticket: {
    lifetime: 86400,
    lifetime_long_term: 864000
  },
  service_ticket: {
    lifetime_unconsumed: 300,
    lifetime_consumed: 86400,
    single_sign_out_notification: {
      timeout: 5
    }
  },
  proxy_ticket: {
    lifetime_unconsumed: 300,
    lifetime_consumed: 86400
  },
  two_factor_authenticator: {
    timeout: 180,
    lifetime_inactive: 300,
    drift: 30
  }
}

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.authenticatorsObject

Returns the value of attribute authenticators.



6
7
8
# File 'lib/casino_core/settings.rb', line 6

def authenticators
  @authenticators
end

.frontendObject

Returns the value of attribute frontend.



6
7
8
# File 'lib/casino_core/settings.rb', line 6

def frontend
  @frontend
end

.loggerObject

Returns the value of attribute logger.



6
7
8
# File 'lib/casino_core/settings.rb', line 6

def logger
  @logger
end

.login_ticketObject

Returns the value of attribute login_ticket.



6
7
8
# File 'lib/casino_core/settings.rb', line 6

def 
  @login_ticket
end

.proxy_ticketObject

Returns the value of attribute proxy_ticket.



6
7
8
# File 'lib/casino_core/settings.rb', line 6

def proxy_ticket
  @proxy_ticket
end

.service_ticketObject

Returns the value of attribute service_ticket.



6
7
8
# File 'lib/casino_core/settings.rb', line 6

def service_ticket
  @service_ticket
end

.ticket_granting_ticketObject

Returns the value of attribute ticket_granting_ticket.



6
7
8
# File 'lib/casino_core/settings.rb', line 6

def ticket_granting_ticket
  @ticket_granting_ticket
end

.two_factor_authenticatorObject

Returns the value of attribute two_factor_authenticator.



6
7
8
# File 'lib/casino_core/settings.rb', line 6

def two_factor_authenticator
  @two_factor_authenticator
end

Class Method Details

.add_defaults(name, config = {}) ⇒ Object



59
60
61
# File 'lib/casino_core/settings.rb', line 59

def add_defaults(name, config = {})
  DEFAULT_SETTINGS[name] = config
end

.init(config = {}) ⇒ Object



33
34
35
36
37
38
39
# File 'lib/casino_core/settings.rb', line 33

def init(config = {})
  DEFAULT_SETTINGS.deep_merge(config).each do |key,value|
    if respond_to?("#{key}=")
      send("#{key}=", value)
    end
  end
end