lib/omni_auth/strategies/saml.rb in cul_omniauth-0.5.5 vs lib/omni_auth/strategies/saml.rb in cul_omniauth-0.6.0
- old
+ new
@@ -77,13 +77,11 @@
credentials do
prune!({ ticket: @ticket })
end
def login_url(service)
- target_url = service.split('?').first
- parms = { TARGET: target_url }
- cas_url + append_params(options.login_url, parms)
+ cas_url + append_params(options.login_url, { TARGET: service })
end
def logout_url(service)
cas_url + append_params(options.logout_url, { service: service})
end
# Build a CAS host with protocol and port
@@ -117,13 +115,14 @@
raise ArgumentError.new(":host and :login_url MUST be provided")
end
end
def service_validate_url(service_url, ticket)
- target_url = service_url.split('?').first
-
+ service_url = Addressable::URI.parse(service_url).origin
parms = {
- TARGET: target_url,
+ TARGET: service_url,
+# service: service_url,
+# ticket: ticket
}
r = cas_url + append_params(options.service_validate_url, parms)
r
end
\ No newline at end of file