Class: CASino::LoginCredentialAcceptorProcessor
- Includes:
- ProcessorConcern::Authentication, ProcessorConcern::LoginTickets, ProcessorConcern::ServiceTickets, ProcessorConcern::TicketGrantingTickets
- Defined in:
- app/processors/casino/login_credential_acceptor_processor.rb
Overview
This processor should be used for POST 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
-
#process(params = nil, user_agent = nil) ⇒ Object
Use this method to process the request.
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
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
Methods included from ProcessorConcern::LoginTickets
#acquire_login_ticket, #login_ticket_valid?
Methods inherited from Processor
Constructor Details
This class inherits a constructor from CASino::Processor
Instance Method Details
#process(params = nil, 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`: The first argument (String) is the URL (if any), the user should be redirected to. The second argument (String) is the ticket-granting ticket. It should be stored in a cookie named “tgt”. The third argument (Time, optional, default = nil) is for “Remember Me” functionality. This is the cookies expiration date. If it is `nil`, the cookie should be a session cookie.
-
‘#invalid_login_ticket` and `#invalid_login_credentials`: The first argument is a LoginTicket. See CASino::LoginCredentialRequestorProcessor for details.
-
‘#service_not_allowed`: The user tried to access a service that this CAS server is not allowed to serve.
-
‘#two_factor_authentication_pending`: The user should be asked to enter his OTP. The first argument (String) is the ticket-granting ticket. The ticket-granting ticket is not active yet. Use SecondFactorAuthenticatonAcceptor to activate it.
23 24 25 26 27 28 29 30 31 |
# File 'app/processors/casino/login_credential_acceptor_processor.rb', line 23 def process(params = nil, user_agent = nil) @params = params || {} @user_agent = user_agent if login_ticket_valid?(@params[:lt]) authenticate_user else @listener.invalid_login_ticket(acquire_login_ticket) end end |