Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

Add capability to interrupt login for another service #177

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions app/helpers/casino/sessions_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module CASino::SessionsHelper
include CASino::TicketGrantingTicketProcessor
include CASino::ServiceTicketProcessor

def current_ticket_granting_ticket?(ticket_granting_ticket)
ticket_granting_ticket.ticket == cookies[:tgt]
end
Expand Down Expand Up @@ -87,8 +87,13 @@ def handle_signed_in_with_service(tgt, options)
@service = params[:service]
render 'casino/sessions/service_not_allowed', status: 403
else
pwm = CASino::config.interrupt_url
url = acquire_service_ticket(tgt, params[:service], options).service_with_ticket_url
redirect_to url, status: :see_other
if pwm == ''
redirect_to url, status: :see_other
else
redirect_to "#{pwm}#{url}", status: :see_other
end
end
end
end