Class: Casablanca::Rails::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/casablanca/rails/filter.rb

Class Method Summary collapse

Class Method Details

.cas_server_urlObject



23
24
25
# File 'lib/casablanca/rails/filter.rb', line 23

def cas_server_url
  @cas_server_url
end

.config {|config| ... } ⇒ Object

Configure the client

Casablanca::Rails::Config.config do |config|
  config[:cas_server_url]  = "http://localhost:4567"
  # Always require new credentials for authentication
  config[:renew]           = true
end

Yields:



15
16
17
18
19
20
21
# File 'lib/casablanca/rails/filter.rb', line 15

def config
  config = {}
  yield config
  @cas_server_url = config[:cas_server_url]
  # set logger to rails logger
  Casablanca::Client.logger = ::ActionController::Base.logger        
end