[%- USE HTTP; # user - The cPanel user (or virtual user that is logged in) # parameterized_form - A dump of the postdata that is uri encoded # theme - The current cPanel theme that the user is using # goto_uri - The uri that the user requested SET query = { 'user' => user, 'theme' => theme, 'parameterized_form' => parameterized_form, }; IF page_to_show == 'token_denied'; query.token_denied = 1; END; IF external_auth_modules.size > 0 && external_auth_modules # Note: the variable "webpros_forced" is declared in the caller (e.g. token_denied.tmpl/login.tmpl) and defines whether we are forcing # that app to login via Webpros Account. In this template we need to remove the "-- or --" from the # display. %]
[% FOR auth_mod = external_auth_modules %] [% IF webpros_forced && auth_mod.provider_name != "webpros"; NEXT; END; IF oidc_failed == auth_mod.provider_name; # This must match use the same regex as unprotected/cpanel/js/login.js IF ENV_REQUEST_URI.match('^\/(?:logout|login|openid_connect_callback)\/?'); SET xauth_link = auth_mod.link.html(); ELSE; SET xauth_link = ENV_REQUEST_URI.html(); END; ELSE; IF auth_mod.link.search('\?'); SET xauth_link = auth_mod.link.html() _ '&' _ HTTP.make_query_string(query); ELSE; SET xauth_link = auth_mod.link.html() _ '?' _ HTTP.make_query_string(query); END; END; %] [% END %]
[% END %]