diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2020-08-11 16:08:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-11 16:08:10 +0100 |
commit | 0cb169900ebd39b6f46dbff1b1909cc5b3c17493 (patch) | |
tree | f903fd61691b639be7deff59f819b83db3a15c51 /synapse/res | |
parent | Merge remote-tracking branch 'origin/master' into develop (diff) | |
download | synapse-0cb169900ebd39b6f46dbff1b1909cc5b3c17493.tar.xz |
Implement login blocking based on SAML attributes (#8052)
Hopefully this mostly speaks for itself. I also did a bit of cleaning up of the error handling. Fixes #8047
Diffstat (limited to 'synapse/res')
-rw-r--r-- | synapse/res/templates/saml_error.html | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/synapse/res/templates/saml_error.html b/synapse/res/templates/saml_error.html index bfd6449c5d..01cd9bdaf3 100644 --- a/synapse/res/templates/saml_error.html +++ b/synapse/res/templates/saml_error.html @@ -2,10 +2,17 @@ <html lang="en"> <head> <meta charset="UTF-8"> - <title>SSO error</title> + <title>SSO login error</title> </head> <body> - <p>Oops! Something went wrong during authentication<span id="errormsg"></span>.</p> +{# a 403 means we have actively rejected their login #} +{% if code == 403 %} + <p>You are not allowed to log in here.</p> +{% else %} + <p> + There was an error during authentication: + </p> + <div id="errormsg" style="margin:20px 80px">{{ msg }}</div> <p> If you are seeing this page after clicking a link sent to you via email, make sure you only click the confirmation link once, and that you open the @@ -37,9 +44,9 @@ // to print one. let errorDesc = new URLSearchParams(searchStr).get("error_description") if (errorDesc) { - - document.getElementById("errormsg").innerText = ` ("${errorDesc}")`; + document.getElementById("errormsg").innerText = errorDesc; } </script> +{% endif %} </body> -</html> \ No newline at end of file +</html> |