Class: CASino::LoginCredentialRequestorProcessor

Inherits:
Processor
  • Object
show all
Includes:
ProcessorConcern::Browser, ProcessorConcern::LoginTickets, ProcessorConcern::ServiceTickets, ProcessorConcern::TicketGrantingTickets
Defined in:
app/processors/casino/login_credential_requestor_processor.rb

Overview

This processor should be used for GET requests to /login

Constant Summary

Constants included from ProcessorConcern::ServiceTickets

ProcessorConcern::ServiceTickets::RESERVED_CAS_PARAMETER_KEYS

Constants included from ProcessorConcern::Tickets

ProcessorConcern::Tickets::ALLOWED_TICKET_STRING_CHARACTERS

Instance Method Summary collapse

Methods included from ProcessorConcern::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 ProcessorConcern::Browser

#browser_info, #same_browser?

Methods included from ProcessorConcern::ServiceTickets

#acquire_service_ticket, #clean_service_url

Methods included from ProcessorConcern::ProxyTickets

#acquire_proxy_ticket, #ticket_valid_for_service?, #validate_ticket_for_service

Methods included from ProcessorConcern::Tickets

#random_ticket_string

Methods included from ProcessorConcern::LoginTickets

#acquire_login_ticket, #login_ticket_valid?

Methods inherited from Processor

#initialize

Constructor Details

This class inherits a constructor from CASino::Processor

Instance Method Details

#process(params = nil, cookies = nil, user_agent = nil) ⇒ Object

Use this method to process the request.

The method will call one of the following methods on the listener:

  • ‘#user_logged_in`: The first argument (String) is the URL (if any), the user should be redirected to.

  • ‘#user_not_logged_in`: The first argument is a LoginTicket. It should be stored in a hidden field with name “lt”.

  • ‘#service_not_allowed`: The user tried to access a service that this CAS server is not allowed to serve.

Parameters:

  • params (Hash) (defaults to: nil)

    parameters supplied by user

  • cookies (Hash) (defaults to: nil)

    cookies supplied by user

  • user_agent (String) (defaults to: nil)

    user-agent delivered by the client



18
19
20
21
22
23
24
25
# File 'app/processors/casino/login_credential_requestor_processor.rb', line 18

def process(params = nil, cookies = nil, user_agent = nil)
  @params = params || {}
  @cookies = cookies || {}
  @user_agent = user_agent || {}
  if check_service_allowed
    handle_allowed_service
  end
end