From e03eaa86a55dc969cc84ed7ab6f98c714ceaf7e2 Mon Sep 17 00:00:00 2001 From: skull132 Date: Mon, 21 Mar 2016 23:05:31 +0200 Subject: [PATCH] client procs.dm - sso_server addition Adds a new route for the webint url parser. Also reverts to checking for config.webint_url as opposed to running double checks for config.webint_enabled and then for the url. If the URL is present, we're enabling the webint. --- code/modules/client/client procs.dm | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index b4197f621e8..3a936f7eb0c 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -75,7 +75,7 @@ warnings_check() if(href_list["linkingrequest"]) - if (!config.webint_enabled) + if (!config.webint_url) return if (!href_list["linkingaction"]) @@ -426,7 +426,7 @@ check_linking_requests() /client/proc/check_linking_requests() - if (!config.webint_enabled || !config.sql_enabled) + if (!config.webint_url || !config.sql_enabled) return establish_db_connection(dbcon) @@ -487,8 +487,20 @@ linkURL = "[config.webint_url]user/link" + if ("interface/login/sso_server") + //This also validates the attributes as it runs + var/new_attributes = webint_start_singlesignon(src, attributes) + if (!new_attributes) + return + + if (!config.webint_url) + return + + linkURL = "[config.webint_url]login/sso_server?" + linkURL += new_attributes + else - log_misc("Unrecognized process_webint_link() call used. Route sent: '[route]'.") + log_debug("Unrecognized process_webint_link() call used. Route sent: '[route]'.") return src << link(linkURL)