Sha256: 48bead6a0a9736a94682bfe6514af9be8f4bb1767e7705576f478363211373a9

Contents?: true

Size: 918 Bytes

Versions: 15

Compression:

Stored size: 918 Bytes

Contents

# The ProxyTicketValidator processor should be used to handle GET requests to /proxyValidate
class CASino::ProxyTicketValidatorProcessor < CASino::ServiceTicketValidatorProcessor

  # 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. The Content-Type should be set to 'text/xml; charset=utf-8'
  #
  # @param [Hash] params parameters delivered by the client
  def process(params = nil)
    params ||= {}
    if request_valid?(params)
      ticket = if params[:ticket].start_with?('PT-')
        CASino::ProxyTicket.where(ticket: params[:ticket]).first
      elsif params[:ticket].start_with?('ST-')
        CASino::ServiceTicket.where(ticket: params[:ticket]).first
      else
        nil
      end
      validate_ticket!(ticket, params)
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
casino-3.0.4 app/processors/casino/proxy_ticket_validator_processor.rb
casino-2.0.7 app/processors/casino/proxy_ticket_validator_processor.rb
casino-3.0.3 app/processors/casino/proxy_ticket_validator_processor.rb
casino-3.0.2 app/processors/casino/proxy_ticket_validator_processor.rb
casino-3.0.1 app/processors/casino/proxy_ticket_validator_processor.rb
casino-3.0.0 app/processors/casino/proxy_ticket_validator_processor.rb
casino-3.0.0.pre.2 app/processors/casino/proxy_ticket_validator_processor.rb
casino-3.0.0.pre.1 app/processors/casino/proxy_ticket_validator_processor.rb
casino-2.0.6 app/processors/casino/proxy_ticket_validator_processor.rb
casino-2.0.5 app/processors/casino/proxy_ticket_validator_processor.rb
casino-2.0.4 app/processors/casino/proxy_ticket_validator_processor.rb
casino-2.0.3 app/processors/casino/proxy_ticket_validator_processor.rb
casino-2.0.2 app/processors/casino/proxy_ticket_validator_processor.rb
casino-2.0.1 app/processors/casino/proxy_ticket_validator_processor.rb
casino-2.0.0 app/processors/casino/proxy_ticket_validator_processor.rb