Class: CASino::LegacyValidatorProcessor
- Includes:
- ProcessorConcern::ServiceTickets
- Defined in:
- app/processors/casino/legacy_validator_processor.rb
Overview
The LegacyValidator processor should be used for GET requests to /validate
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
-
#process(params = nil) ⇒ Object
This method will call ‘#validation_succeeded` or `#validation_failed`.
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
Methods inherited from Processor
Constructor Details
This class inherits a constructor from CASino::Processor
Instance Method Details
#process(params = nil) ⇒ Object
This method will call ‘#validation_succeeded` or `#validation_failed`. In both cases, it supplies a string as argument. The web application should present that string (and nothing else) to the requestor.
10 11 12 13 14 15 16 17 18 |
# File 'app/processors/casino/legacy_validator_processor.rb', line 10 def process(params = nil) params ||= {} ticket = CASino::ServiceTicket.where(ticket: params[:ticket]).first if !params[:service].nil? && ticket_valid_for_service?(ticket, params[:service], !!params[:renew]) @listener.validation_succeeded("yes\n#{ticket.ticket_granting_ticket.user.username}\n") else @listener.validation_failed("no\n\n") end end |