Sha256: f42caed20d83096495a3ad8c4b9d4ab60c5e576ae3d53694a12f319f10980ef3
Contents?: true
Size: 855 Bytes
Versions: 15
Compression:
Stored size: 855 Bytes
Contents
module CASino module ProcessorConcern module LoginTickets include CASino::ProcessorConcern::Tickets def acquire_login_ticket ticket = CASino::LoginTicket.create ticket: random_ticket_string('LT') Rails.logger.debug "Created login ticket '#{ticket.ticket}'" ticket end def login_ticket_valid?(lt) ticket = CASino::LoginTicket.find_by_ticket lt if ticket.nil? Rails.logger.info "Login ticket '#{lt}' not found" false elsif ticket.created_at < CASino.config.login_ticket[:lifetime].seconds.ago Rails.logger.info "Login ticket '#{ticket.ticket}' expired" false else Rails.logger.debug "Login ticket '#{ticket.ticket}' successfully validated" ticket.delete true end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems