Closed GoogleCodeExporter closed 9 years ago
Original comment by matt.zuk...@gmail.com
on 15 Jul 2010 at 6:58
def logout_url(destination_url = nil, follow_url = nil)
result = ''
url = @logout_url || (cas_base_url + "/logout")
if destination_url
# if present, remove the 'ticket' parameter from the
destination_url
duri = URI.parse(destination_url)
h = duri.query ? query_to_hash(duri.query) : {}
h.delete('ticket')
duri.query = hash_to_query(h)
destination_url = duri.to_s.gsub(/\?$/, '')
end
if destination_url || follow_url
uri = URI.parse(url)
h = uri.query ? query_to_hash(uri.query) : {}
h['destination'] = destination_url if destination_url
h['url'] = follow_url if follow_url
uri.query = hash_to_query(h)
result = uri.to_s
else
result = url
end
result += '&gateway=1'
return result
end
Original comment by soorya.s...@gmail.com
on 8 Jan 2012 at 10:01
Original issue reported on code.google.com by
Pas...@gmail.com
on 15 Jul 2010 at 1:00