From 3734d910935f34427632a36206aa3b6b0822c9bf Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Wed, 11 Dec 2019 12:45:58 +0100 Subject: fix LoA level validation error in AuthnRequestValidator.java --- .../config/webcontent/css/css_country.css | 137 +++++++++++++++++++++ .../resources/config/webcontent/js/js_country.js | 42 +++++++ 2 files changed, 179 insertions(+) create mode 100644 connector/src/test/resources/config/webcontent/css/css_country.css create mode 100644 connector/src/test/resources/config/webcontent/js/js_country.js (limited to 'connector/src/test/resources/config/webcontent') diff --git a/connector/src/test/resources/config/webcontent/css/css_country.css b/connector/src/test/resources/config/webcontent/css/css_country.css new file mode 100644 index 00000000..4091955f --- /dev/null +++ b/connector/src/test/resources/config/webcontent/css/css_country.css @@ -0,0 +1,137 @@ +@charset "utf-8"; + body { + background-image: none; + margin: 0px; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + } + #page { + padding-top: 2%; + padding-left: 10%; + } + + #country { + display: flex; + flex-direction: row; + flex-wrap: wrap; + align-items: center; + } + + .block { + display: flex; + flex-direction: row; + flex-wrap: wrap; + cursor: pointer; + text-decoration: none; + padding-right:2%; + width: 250px; + } + + .countryimage { + width:50px; + height:50px; + padding-right: 2%; + padding-bottom: 4%; + } + + input[type=button], input[type=submit], input[type=reset] { + display:flex; + background-color:transparent; + border:none; + color: black; + text-decoration: none; + cursor: pointer; + } + #testEnvironment { + border: none; + color: black; + padding: 10px 20px; + text-decoration: none; + margin: 4px 2px; + height: 3%; + display: inline-block; + vertical-align: middle; + width: 40%; + } + #button{ + background-color: transparent; + border:none; + } + div.header { + background-color: #e9ecef; + padding-top: 28px; + padding-left: 137px; + padding-right: 137px; + padding-bottom: 12px; + } + div.titlebar { + padding: 0px; + } + div.titlebar div { + } + .hidden { + display: none; + } + ul.nav_oben { + padding: 0px; + margin: 0px; + text-align: right; + text-transform: uppercase; + } + li { + display: inline-block; + } + div.header a { + text-decoration: none; + color: black; + } + a { + text-decoration: none; + color: #a22c1c; + } + .content { + padding-left: 137px; + padding-right: 137px; + } + div.subtitle h1 { + padding: 0px; + margin: 0px; + font-size: 130%; + align: right; + } + div.subtitle h2 { + padding: 0px; + margin: 0px; + font-size: 115%; + } + footer { + position: fixed; + left: 0; + padding-left: 137px; + padding-right: 137px; + padding-top: 1em; + bottom: 0; + width: 100%; + height: 2em; + background-color: rgb(162,44,28); + color: white; + } + .float { + float: left; + } + .floatright { + float: right; + } + .copyright { + width: 66%; + font-size: 80%; + } + #countries,#country { + padding-bottom: 40px; + } + input[type=submit] { + width: inherit; + /* text-align: left; */ + } + form { + justify-content: center; + } \ No newline at end of file diff --git a/connector/src/test/resources/config/webcontent/js/js_country.js b/connector/src/test/resources/config/webcontent/js/js_country.js new file mode 100644 index 00000000..5dcea90e --- /dev/null +++ b/connector/src/test/resources/config/webcontent/js/js_country.js @@ -0,0 +1,42 @@ +function clickCountryFlag(element) { + if (!element) return false; + + var form = element.target.closest("form"); + + if (!form) return false; + + form.submit(); + return false; +} + + +/* Set JS events by EventListener to prevent problems with CSP*/ +document.addEventListener("DOMContentLoaded", function(event) { + + /* Element.closest polyfill - https://developer.mozilla.org/en-US/docs/Web/API/Element/closest License: public domain*/ + if (!Element.prototype.matches) + Element.prototype.matches = Element.prototype.msMatchesSelector || + Element.prototype.webkitMatchesSelector; + + if (!Element.prototype.closest) + Element.prototype.closest = function(s) { + var el = this; + if (!document.documentElement.contains(el)) return null; + do { + if (el.matches(s)) return el; + el = el.parentElement || el.parentNode; + } while (el !== null && el.nodeType === 1); + return null; + }; + + /* set Click events by EventListener to prevent JavaScript in HTML which can be a problem with CSP*/ + var allFlags = document.getElementsByClassName("countryimage"); + for (i=0;i