Class: CASinoCore::Processor::SessionOverview
- Inherits:
-
CASinoCore::Processor
- Object
- CASinoCore::Processor
- CASinoCore::Processor::SessionOverview
- Includes:
- Helper::TicketGrantingTickets
- Defined in:
- lib/casino_core/processor/session_overview.rb
Overview
The SessionOverview processor to list all open session for the currently signed in user.
This feature is not described in the CAS specification so it’s completly optional to implement this on the web application side.
Instance Method Summary collapse
-
#process(cookies = nil, user_agent = nil) ⇒ Object
This method will call
#user_not_logged_inor ‘#ticket_granting_tickets_found(Enumerable)` on the listener.
Methods included from Helper::TicketGrantingTickets
#acquire_ticket_granting_ticket, #cleanup_expired_ticket_granting_tickets, #find_valid_ticket_granting_ticket, #load_or_initialize_user, #remove_ticket_granting_ticket
Methods included from Helper::Logger
Methods included from Helper::Browser
Methods inherited from CASinoCore::Processor
Constructor Details
This class inherits a constructor from CASinoCore::Processor
Instance Method Details
#process(cookies = nil, user_agent = nil) ⇒ Object
This method will call #user_not_logged_in or ‘#ticket_granting_tickets_found(Enumerable)` on the listener.
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/casino_core/processor/session_overview.rb', line 15 def process( = nil, user_agent = nil) ||= {} tgt = find_valid_ticket_granting_ticket([:tgt], user_agent) if tgt.nil? @listener.user_not_logged_in else ticket_granting_tickets = tgt.user.ticket_granting_tickets.where(awaiting_two_factor_authentication: false).order('updated_at DESC') @listener.ticket_granting_tickets_found(ticket_granting_tickets) end end |