Class: CASClient::Frameworks::Rails::RequestHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/casclient/frameworks/rails/request_handler.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(controller, use_gatewaying = false) ⇒ RequestHandler

Returns a new instance of RequestHandler.



12
13
14
15
# File 'lib/casclient/frameworks/rails/request_handler.rb', line 12

def initialize(controller, use_gatewaying=false)
  @controller = controller
  @use_gatewaying = use_gatewaying
end

Instance Attribute Details

#use_gatewayingObject

Returns the value of attribute use_gatewaying.



6
7
8
# File 'lib/casclient/frameworks/rails/request_handler.rb', line 6

def use_gatewaying
  @use_gatewaying
end

Class Method Details

.handle_request(controller, use_gatewaying = false) ⇒ Object



8
9
10
# File 'lib/casclient/frameworks/rails/request_handler.rb', line 8

def self.handle_request(controller, use_gatewaying=false)
  new(controller, use_gatewaying=false).handle_request
end

Instance Method Details

#clientObject



33
34
35
# File 'lib/casclient/frameworks/rails/request_handler.rb', line 33

def client
  CASClient::Frameworks::Rails::Filter.client
end

#configObject



29
30
31
# File 'lib/casclient/frameworks/rails/request_handler.rb', line 29

def config
  CASClient::Frameworks::Rails::Filter.config
end

#handle_requestObject



17
18
19
20
21
22
23
24
25
26
27
# File 'lib/casclient/frameworks/rails/request_handler.rb', line 17

def handle_request
  return :single_sign_out if single_sign_out?(@controller)

  st, require_validation = determine_request_context(@controller)

  if st
    handle_ticket(@controller, st, require_validation)
  else
    handle_no_ticket(@controller)
  end
end

#logObject



37
38
39
# File 'lib/casclient/frameworks/rails/request_handler.rb', line 37

def log
  CASClient::Frameworks::Rails::Filter.log
end