Class: CASino::API::LoginCredentialAcceptorProcessor

Inherits:
Processor
  • Object
show all
Includes:
ProcessorConcern::Authentication, ProcessorConcern::ServiceTickets, ProcessorConcern::TicketGrantingTickets
Defined in:
app/processors/casino/api/login_credential_acceptor_processor.rb

Overview

This processor should be used for API calls: POST /cas/v1/tickets

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::Authentication

#authenticators, #validate_login_credentials

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 inherited from Processor

#initialize

Constructor Details

This class inherits a constructor from CASino::Processor

Instance Method Details

#process(login_data, user_agent = nil) ⇒ Object

Use this method to process the request. It expects the username in the parameter “username” and the password in “password”.

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

  • ‘#user_logged_in_via_api`: First and only argument is a String with the TGT-id

  • ‘#invalid_login_credentials_via_api`: No argument

Parameters:

  • login_data (Hash)

    parameters supplied by user (username and password)



15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'app/processors/casino/api/login_credential_acceptor_processor.rb', line 15

def process(, user_agent = nil)
  @login_data = 
  @user_agent = user_agent

  

  unless @authentication_result.nil?
    generate_ticket_granting_ticket
    callback_user_logged_in
  else
    
  end
end