From 550ba6452a44cd93066fc5317de626d21758901b Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Fri, 11 Oct 2013 14:00:05 +0200 Subject: -- Customizable BKUSelection Form and SendAssertion Form -- OA specific Checkbox to disable SAML1 --- id/server/auth/src/main/webapp/css/index.css | 902 ++++++++++----------- .../auth/src/main/webapp/img/2.0/bg_footer.png | Bin 266 -> 0 bytes .../auth/src/main/webapp/img/2.0/bg_header.png | Bin 491 -> 0 bytes .../auth/src/main/webapp/img/2.0/bg_mainnav.png | Bin 192 -> 0 bytes .../src/main/webapp/img/2.0/bg_mainnav_left.png | Bin 236 -> 0 bytes .../src/main/webapp/img/2.0/bg_mainnav_right.png | Bin 3282 -> 0 bytes .../auth/src/main/webapp/img/2.0/bku_local.gif | Bin 1354 -> 0 bytes .../auth/src/main/webapp/img/2.0/bku_mobile.gif | Bin 1558 -> 0 bytes .../auth/src/main/webapp/img/2.0/bku_online.gif | Bin 1301 -> 0 bytes .../src/main/webapp/img/2.0/checkbox_checked.png | Bin 878 -> 0 bytes .../src/main/webapp/img/2.0/checkbox_unchecked.gif | Bin 117 -> 0 bytes id/server/auth/src/main/webapp/img/2.0/dsk.ico | Bin 3262 -> 0 bytes id/server/auth/src/main/webapp/img/2.0/logo.png | Bin 11141 -> 0 bytes .../src/main/webapp/img/2.0/logo_digitalesOE.gif | Bin 1242 -> 0 bytes .../auth/src/main/webapp/img/2.0/logo_dsk_nav.png | Bin 5860 -> 0 bytes .../main/webapp/img/2.0/logo_dsk_szr_header.png | Bin 85110 -> 0 bytes .../auth/src/main/webapp/img/2.0/std_handy.gif | Bin 2632 -> 0 bytes .../auth/src/main/webapp/img/2.0/std_karte.gif | Bin 2369 -> 0 bytes id/server/auth/src/main/webapp/img/mobile-bku.png | Bin 0 -> 4602 bytes id/server/auth/src/main/webapp/img/online-bku.png | Bin 0 -> 6011 bytes .../auth/src/main/webapp/img/valid-html5-blue.png | Bin 0 -> 3297 bytes .../auth/src/main/webapp/img/w3cvalidhtml5.jpg | Bin 0 -> 1938 bytes .../auth/src/main/webapp/template_handyBKU.html | 8 +- .../auth/src/main/webapp/template_onlineBKU.html | 6 +- id/server/idserverlib/pom.xml | 4 +- .../moa/id/auth/AuthenticationServer.java | 13 +- .../moa/id/auth/MOAIDAuthConstants.java | 3 + .../auth/builder/GetIdentityLinkFormBuilder.java | 38 +- .../moa/id/auth/builder/LoginFormBuilder.java | 34 +- .../id/auth/builder/SendAssertionFormBuilder.java | 10 +- .../auth/builder/StartAuthenticationBuilder.java | 2 +- .../servlet/GenerateIFrameTemplateServlet.java | 4 + .../moa/id/config/auth/OAAuthParameter.java | 60 +- .../id/config/legacy/BuildFromLegacyConfig.java | 1 + .../moa/id/protocols/saml1/SAML1Protocol.java | 10 +- .../gv/egovernment/moa/id/util/FormBuildUtils.java | 82 ++ .../resources/templates/loginFormFull.html | 821 ++++++++++++++++--- .../resources/templates/sendAssertionFormFull.html | 597 +++++++++++++- .../builder/GetIdentityLinkFormBuilderTest.java | 4 +- .../src/main/resources/config/moaid_config_2.0.xsd | 19 +- 40 files changed, 1949 insertions(+), 669 deletions(-) delete mode 100644 id/server/auth/src/main/webapp/img/2.0/bg_footer.png delete mode 100644 id/server/auth/src/main/webapp/img/2.0/bg_header.png delete mode 100644 id/server/auth/src/main/webapp/img/2.0/bg_mainnav.png delete mode 100644 id/server/auth/src/main/webapp/img/2.0/bg_mainnav_left.png delete mode 100644 id/server/auth/src/main/webapp/img/2.0/bg_mainnav_right.png delete mode 100644 id/server/auth/src/main/webapp/img/2.0/bku_local.gif delete mode 100644 id/server/auth/src/main/webapp/img/2.0/bku_mobile.gif delete mode 100644 id/server/auth/src/main/webapp/img/2.0/bku_online.gif delete mode 100644 id/server/auth/src/main/webapp/img/2.0/checkbox_checked.png delete mode 100644 id/server/auth/src/main/webapp/img/2.0/checkbox_unchecked.gif delete mode 100644 id/server/auth/src/main/webapp/img/2.0/dsk.ico delete mode 100644 id/server/auth/src/main/webapp/img/2.0/logo.png delete mode 100644 id/server/auth/src/main/webapp/img/2.0/logo_digitalesOE.gif delete mode 100644 id/server/auth/src/main/webapp/img/2.0/logo_dsk_nav.png delete mode 100644 id/server/auth/src/main/webapp/img/2.0/logo_dsk_szr_header.png delete mode 100644 id/server/auth/src/main/webapp/img/2.0/std_handy.gif delete mode 100644 id/server/auth/src/main/webapp/img/2.0/std_karte.gif create mode 100644 id/server/auth/src/main/webapp/img/mobile-bku.png create mode 100644 id/server/auth/src/main/webapp/img/online-bku.png create mode 100644 id/server/auth/src/main/webapp/img/valid-html5-blue.png create mode 100644 id/server/auth/src/main/webapp/img/w3cvalidhtml5.jpg create mode 100644 id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/FormBuildUtils.java (limited to 'id/server') diff --git a/id/server/auth/src/main/webapp/css/index.css b/id/server/auth/src/main/webapp/css/index.css index d8ad49bae..622f6c255 100644 --- a/id/server/auth/src/main/webapp/css/index.css +++ b/id/server/auth/src/main/webapp/css/index.css @@ -1,451 +1,451 @@ -@charset "utf-8"; - -@media screen and (min-width: 650px) { - - body { - margin:0; - padding:0; - color : #000; - background-color : #fff; - font-family : Verdana, Geneva, Arial, sans-serif; - font-size:76%; - text-align: center; - background-color: #6B7B8B; - } - - #page { - display: block; - border: 2px solid rgb(0,0,0); - width: 650px; - height: 440px; - margin: 0 auto; - margin-top: 5%; - position: relative; - border-radius: 25px; - background: rgb(255,255,255); - } - - #page1 { - text-align: center; - } - - #main { - /* clear:both; */ - position:relative; - margin: 0 auto; - width: 250px; - text-align: center; - } - - .OA_header { -/* background-color: white;*/ - font-size: 20pt; - margin-bottom: 25px; - margin-top: 25px; - } - - #leftcontent { - /*float:left; */ - width:250px; - margin-bottom: 25px; - text-align: left; - border: 1px solid rgb(0,0,0); - } - - h2#tabheader.full { - padding:5px; - font-size:20px; - color:#fff; - border-bottom:2px solid #fff; - } - - #selectArea.full { - font-size: 15px; - padding-bottom: 65px; - } - - #leftcontent.full { - width: 400px; - margin-top: 30px; - } - - #main.full { - width: 400px; - } - - .setAssertionButton_full { - background: #efefef; - cursor: pointer; - margin-top: 15px; - width: 100px; - height: 30px - } - - #leftbutton.full { - width: 30%; - float:left; - margin-left: 40px; - } - - #rightbutton.full { - width: 30%; - float:right; - margin-right: 45px; - text-align: right; - } - -} - -@media screen and (max-width: 649px) { - - body { - margin:0; - padding:0; - color : #000; - background-color : #fff; - font-family : Verdana, Geneva, Arial, sans-serif; - font-size:76%; - text-align: center; - background-color: #FFFFFF; - } - - #page { - visibility: hidden; - margin-top: 0%; - - } - - #page1 { - visibility: hidden; - } - - #main { - visibility: hidden; - } - - .OA_header { - margin-bottom: 0px; - margin-top: 0px; - font-size: 0pt; - visibility: hidden; - } - - #leftcontent { - visibility: visible; - margin-bottom: 0px; - text-align: left; - border:none; - width:250px; - } - - .setAssertionButton_full { - background: #efefef; - cursor: pointer; - margin-top: 15px; - width: 70px; - height: 25px; - } -} - -* { - margin:0; - padding:0; - border:0; -} - - -/* skiplink */ - -#skiplinks { - position:relative; -} - -p#skiplinks a { - - position: absolute; - top: -999em; - left: -999em; - height: 0; - width: 0; - overflow: hidden; -} - -p#skiplinks a:focus, -p#skiplinks a:hover, -p#skiplinks a:active { - height: auto; - width:auto; - left: 0; - top: 0; - padding: 4px; - position: absolute; - overflow: visible; - text-decoration: none; - z-index: 100; -} - -/*layout */ - -#wrapper { - min-width:746px; - max-width:1258px; - padding: 0 10px; -} - -#banner { - width:100%; - min-height:100px; - padding-top:20px; - position:relative; -} - -#bannerleft { - float:left; -} - -#bannerleft h1 { - font-size:2em; - padding-top:10px; -} - -#bannerright { - float:right; -} - -/* left */ - -.iframebkuselection { - text-align: center; - padding-bottom: 25px; - background-color : #DDDDDD; -} - -h2#tabheader, h2#contentheader { - padding-bottom: 2px; - padding-right: 2px; - padding-top: 2px; - padding-left: 5px; - font-size:1.1em; - color:#fff; - border-bottom:2px solid #fff; -} - -#selectArea { - padding-top: 10px; - padding-bottom: 55px; - padding-left: 10px; -} - -.setAssertionButton { - background: #efefef; - cursor: pointer; - margin-top: 15px; - width: 70px; - height: 25px; -} - -#leftbutton { - width: 35%; - float:left; - margin-left: 15px; -} - -#rightbutton { - width: 35%; - float:right; - margin-right: 25px; - text-align: right; -} - -#stork { - margin-bottom: 10px; - margin-top: 5px; -} - -#bkulogin { - overflow:hidden; - width:250px; - padding-top: 10px; -} - -#bkukarte { - float:left; - background: url(../img/karte.gif) no-repeat top center; - padding: 90px 10px 10px 10px; - text-align:center; - width:40%; -} - -#bkuhandy { - float:right; - background: url(../img/handy.gif) no-repeat top center; - padding: 90px 10px 10px 10px; - text-align:center; - width:40%; -} - -#mandate{ - text-align:center; - padding : 5px 5px 5px 5px; -} - -button { - background: #efefef; - border:1px solid #000; - cursor: pointer; -} - -input { - background: #efefef; - border:1px solid #000; - cursor: pointer; -} - -#installJava, #BrowserNOK { - clear:both; - font-size:0.8em; - padding:4px; -} - -#localBKU { - padding:4px; -} - -.selectText{ - -} - -.selectTextHeader{ - -} - -.sendButton { - background-color: DarkGray; - border-style: solid; - border-width: 1px; - border-color: black; -} - - -#tab { - margin-top:2px; - padding:2px; - clear:both; -} - -#leftcontent a { - text-decoration:none; - color: #000; -/* display:block;*/ - padding:4px; -} - -#leftcontent a:hover, #leftcontent a:focus, #leftcontent a:active { - text-decoration:underline; - color: #000; -} - -#navlist { - margin-top:20px; -} - -#navlist ul { - list-style: none; - margin-left: 0; -} - -#navlist li { - border-bottom:1px solid #fff; -} - -iframe { - width:250px; - height: 180px -} - -/* right */ - -#rightcontent { - float:right; - width:220px; -} - -#centercontent { - width:auto; - margin: 0 230px; -} - -/* center */ - -#content { - padding:20px; -} - -#content a { - text-decoration:underline; - color: #000; -} - -#content a:hover, #content a:focus, #content a:active { - text-decoration:underline; - color: #000; -} - -p { - margin-bottom:1em; -} - -.lightblock{ - text-align : left; - padding : 5px 5px 5px 5px; -} - - -#mandateLogin { - vertical-align: middle; -} - - -.infobutton { - background-color: #005a00; - color: white; - font-family: serif; - text-decoration: none; - padding-top: 2px; - padding-right: 4px; - padding-bottom: 2px; - padding-left: 4px; - font-weight: bold; -} - - -/* [OPTIONAL] Geben Sie hier die Farbe fuer den hellen Hintergrund an */ -.hell { - background-color : #DDDDDD; -} - -/* [OPTIONAL] Geben Sie hier die Farbe fuer den dunklen Hintergrund an */ -.dunkel { - background-color: #A02D2D; -} - -/* [OPTIONAL] Geben Sie hier die Farbe fuer Links an */ -#leftcontent a, #content a { - color: white; -} - -.main_header { - color: black; - font-size: 32pt; - position: absolute; - right: 10%; - top: 40px; - -} - -@media print { - #wrapper { width:100%;} - #banner {width:640px;} - #rightcontent {display: none;} - #centercontent {width:400px; margin-right:0;} -} + @charset "utf-8"; + + @media screen and (min-width: 650px) { + + body { + margin:0; + padding:0; + color : #000; + background-color : #fff; + font-family : Verdana, Geneva, Arial, sans-serif; + font-size:76%; + text-align: center; + background-color: #6B7B8B; + } + + #page { + display: block; + border: 2px solid rgb(0,0,0); + width: 650px; + height: 440px; + margin: 0 auto; + margin-top: 5%; + position: relative; + border-radius: 25px; + background: rgb(255,255,255); + } + + #page1 { + text-align: center; + } + + #main { + /* clear:both; */ + position:relative; + margin: 0 auto; + width: 250px; + text-align: center; + } + + .OA_header { + /* background-color: white;*/ + font-size: 20pt; + margin-bottom: 25px; + margin-top: 25px; + } + + #leftcontent { + /*float:left; */ + width:250px; + margin-bottom: 25px; + text-align: left; + border: 1px solid rgb(0,0,0); + } + + h2#tabheader.full { + padding:5px; + font-size:20px; + color:#fff; + border-bottom:2px solid #fff; + } + + #selectArea.full { + font-size: 15px; + padding-bottom: 65px; + } + + #leftcontent.full { + width: 400px; + margin-top: 30px; + } + + #main.full { + width: 400px; + } + + .setAssertionButton_full { + background: #efefef; + cursor: pointer; + margin-top: 15px; + width: 100px; + height: 30px + } + + #leftbutton.full { + width: 30%; + float:left; + margin-left: 40px; + } + + #rightbutton.full { + width: 30%; + float:right; + margin-right: 45px; + text-align: right; + } + + } + + @media screen and (max-width: 649px) { + + body { + margin:0; + padding:0; + color : #000; + background-color : #fff; + font-family : Verdana, Geneva, Arial, sans-serif; + font-size:76%; + text-align: center; + background-color: #FFFFFF; + } + + #page { + visibility: hidden; + margin-top: 0%; + + } + + #page1 { + visibility: hidden; + } + + #main { + visibility: hidden; + } + + .OA_header { + margin-bottom: 0px; + margin-top: 0px; + font-size: 0pt; + visibility: hidden; + } + + #leftcontent { + visibility: visible; + margin-bottom: 0px; + text-align: left; + border:none; + width:250px; + } + + .setAssertionButton_full { + background: #efefef; + cursor: pointer; + margin-top: 15px; + width: 70px; + height: 25px; + } + } + + * { + margin:0; + padding:0; + border:0; + } + + + /* skiplink */ + + #skiplinks { + position:relative; + } + + p#skiplinks a { + + position: absolute; + top: -999em; + left: -999em; + height: 0; + width: 0; + overflow: hidden; + } + + p#skiplinks a:focus, + p#skiplinks a:hover, + p#skiplinks a:active { + height: auto; + width:auto; + left: 0; + top: 0; + padding: 4px; + position: absolute; + overflow: visible; + text-decoration: none; + z-index: 100; + } + + /*layout */ + + #wrapper { + min-width:746px; + max-width:1258px; + padding: 0 10px; + } + + #banner { + width:100%; + min-height:100px; + padding-top:20px; + position:relative; + } + + #bannerleft { + float:left; + } + + #bannerleft h1 { + font-size:2em; + padding-top:10px; + } + + #bannerright { + float:right; + } + + /* left */ + + .iframebkuselection { + text-align: center; + padding-bottom: 25px; + background-color : #DDDDDD; + } + + h2#tabheader, h2#contentheader { + padding-bottom: 2px; + padding-right: 2px; + padding-top: 2px; + padding-left: 5px; + font-size:1.1em; + color:#fff; + border-bottom:2px solid #fff; + } + + #selectArea { + padding-top: 10px; + padding-bottom: 55px; + padding-left: 10px; + } + + .setAssertionButton { + background: #efefef; + cursor: pointer; + margin-top: 15px; + width: 70px; + height: 25px; + } + + #leftbutton { + width: 35%; + float:left; + margin-left: 15px; + } + + #rightbutton { + width: 35%; + float:right; + margin-right: 25px; + text-align: right; + } + + #stork { + margin-bottom: 10px; + margin-top: 5px; + } + + #bkulogin { + overflow:hidden; + width:250px; + padding-top: 10px; + } + + #bkukarte { + float:left; + background: url(../img/karte.gif) no-repeat top center; + padding: 90px 10px 10px 10px; + text-align:center; + width:40%; + } + + #bkuhandy { + float:right; + background: url(../img/handy.gif) no-repeat top center; + padding: 90px 10px 10px 10px; + text-align:center; + width:40%; + } + + #mandate{ + text-align:center; + padding : 5px 5px 5px 5px; + } + + button { + background: #efefef; + border:1px solid #000; + cursor: pointer; + } + + input { + background: #efefef; + border:1px solid #000; + cursor: pointer; + } + + #installJava, #BrowserNOK { + clear:both; + font-size:0.8em; + padding:4px; + } + + #localBKU { + padding:4px; + } + + .selectText{ + + } + + .selectTextHeader{ + + } + + .sendButton { + background-color: DarkGray; + border-style: solid; + border-width: 1px; + border-color: black; + } + + + #tab { + margin-top:2px; + padding:2px; + clear:both; + } + + #leftcontent a { + text-decoration:none; + color: #000; + /* display:block;*/ + padding:4px; + } + + #leftcontent a:hover, #leftcontent a:focus, #leftcontent a:active { + text-decoration:underline; + color: #000; + } + + #navlist { + margin-top:20px; + } + + #navlist ul { + list-style: none; + margin-left: 0; + } + + #navlist li { + border-bottom:1px solid #fff; + } + + iframe { + width:250px; + height: 180px + } + + /* right */ + + #rightcontent { + float:right; + width:220px; + } + + #centercontent { + width:auto; + margin: 0 230px; + } + + /* center */ + + #content { + padding:20px; + } + + #content a { + text-decoration:underline; + color: #000; + } + + #content a:hover, #content a:focus, #content a:active { + text-decoration:underline; + color: #000; + } + + p { + margin-bottom:1em; + } + + .lightblock{ + text-align : left; + padding : 5px 5px 5px 5px; + } + + + #mandateLogin { + vertical-align: middle; + } + + + .infobutton { + background-color: #005a00; + color: white; + font-family: serif; + text-decoration: none; + padding-top: 2px; + padding-right: 4px; + padding-bottom: 2px; + padding-left: 4px; + font-weight: bold; + } + + + /* [OPTIONAL] Geben Sie hier die Farbe fuer den hellen Hintergrund an */ + .hell { + background-color : #DDDDDD; + } + + /* [OPTIONAL] Geben Sie hier die Farbe fuer den dunklen Hintergrund an */ + .dunkel { + background-color: #A02D2D; + } + + /* [OPTIONAL] Geben Sie hier die Farbe fuer Links an */ + #leftcontent a, #content a { + color: white; + } + + .main_header { + color: black; + font-size: 32pt; + position: absolute; + right: 10%; + top: 40px; + + } + + @media print { + #wrapper { width:100%;} + #banner {width:640px;} + #rightcontent {display: none;} + #centercontent {width:400px; margin-right:0;} + } diff --git a/id/server/auth/src/main/webapp/img/2.0/bg_footer.png b/id/server/auth/src/main/webapp/img/2.0/bg_footer.png deleted file mode 100644 index d8a430e0f..000000000 Binary files a/id/server/auth/src/main/webapp/img/2.0/bg_footer.png and /dev/null differ diff --git a/id/server/auth/src/main/webapp/img/2.0/bg_header.png b/id/server/auth/src/main/webapp/img/2.0/bg_header.png deleted file mode 100644 index 190cf97ea..000000000 Binary files a/id/server/auth/src/main/webapp/img/2.0/bg_header.png and /dev/null differ diff --git a/id/server/auth/src/main/webapp/img/2.0/bg_mainnav.png b/id/server/auth/src/main/webapp/img/2.0/bg_mainnav.png deleted file mode 100644 index efaf93582..000000000 Binary files a/id/server/auth/src/main/webapp/img/2.0/bg_mainnav.png and /dev/null differ diff --git a/id/server/auth/src/main/webapp/img/2.0/bg_mainnav_left.png b/id/server/auth/src/main/webapp/img/2.0/bg_mainnav_left.png deleted file mode 100644 index 1dd281826..000000000 Binary files a/id/server/auth/src/main/webapp/img/2.0/bg_mainnav_left.png and /dev/null differ diff --git a/id/server/auth/src/main/webapp/img/2.0/bg_mainnav_right.png b/id/server/auth/src/main/webapp/img/2.0/bg_mainnav_right.png deleted file mode 100644 index f598be094..000000000 Binary files a/id/server/auth/src/main/webapp/img/2.0/bg_mainnav_right.png and /dev/null differ diff --git a/id/server/auth/src/main/webapp/img/2.0/bku_local.gif b/id/server/auth/src/main/webapp/img/2.0/bku_local.gif deleted file mode 100644 index 9bbf631c0..000000000 Binary files a/id/server/auth/src/main/webapp/img/2.0/bku_local.gif and /dev/null differ diff --git a/id/server/auth/src/main/webapp/img/2.0/bku_mobile.gif b/id/server/auth/src/main/webapp/img/2.0/bku_mobile.gif deleted file mode 100644 index 97c8cee35..000000000 Binary files a/id/server/auth/src/main/webapp/img/2.0/bku_mobile.gif and /dev/null differ diff --git a/id/server/auth/src/main/webapp/img/2.0/bku_online.gif b/id/server/auth/src/main/webapp/img/2.0/bku_online.gif deleted file mode 100644 index 03a54765a..000000000 Binary files a/id/server/auth/src/main/webapp/img/2.0/bku_online.gif and /dev/null differ diff --git a/id/server/auth/src/main/webapp/img/2.0/checkbox_checked.png b/id/server/auth/src/main/webapp/img/2.0/checkbox_checked.png deleted file mode 100644 index 562fbc66f..000000000 Binary files a/id/server/auth/src/main/webapp/img/2.0/checkbox_checked.png and /dev/null differ diff --git a/id/server/auth/src/main/webapp/img/2.0/checkbox_unchecked.gif b/id/server/auth/src/main/webapp/img/2.0/checkbox_unchecked.gif deleted file mode 100644 index c93a6ea06..000000000 Binary files a/id/server/auth/src/main/webapp/img/2.0/checkbox_unchecked.gif and /dev/null differ diff --git a/id/server/auth/src/main/webapp/img/2.0/dsk.ico b/id/server/auth/src/main/webapp/img/2.0/dsk.ico deleted file mode 100644 index df7e8d31e..000000000 Binary files a/id/server/auth/src/main/webapp/img/2.0/dsk.ico and /dev/null differ diff --git a/id/server/auth/src/main/webapp/img/2.0/logo.png b/id/server/auth/src/main/webapp/img/2.0/logo.png deleted file mode 100644 index dfb4351d0..000000000 Binary files a/id/server/auth/src/main/webapp/img/2.0/logo.png and /dev/null differ diff --git a/id/server/auth/src/main/webapp/img/2.0/logo_digitalesOE.gif b/id/server/auth/src/main/webapp/img/2.0/logo_digitalesOE.gif deleted file mode 100644 index ff83cd82b..000000000 Binary files a/id/server/auth/src/main/webapp/img/2.0/logo_digitalesOE.gif and /dev/null differ diff --git a/id/server/auth/src/main/webapp/img/2.0/logo_dsk_nav.png b/id/server/auth/src/main/webapp/img/2.0/logo_dsk_nav.png deleted file mode 100644 index 9b3e7055a..000000000 Binary files a/id/server/auth/src/main/webapp/img/2.0/logo_dsk_nav.png and /dev/null differ diff --git a/id/server/auth/src/main/webapp/img/2.0/logo_dsk_szr_header.png b/id/server/auth/src/main/webapp/img/2.0/logo_dsk_szr_header.png deleted file mode 100644 index b4f8be6d8..000000000 Binary files a/id/server/auth/src/main/webapp/img/2.0/logo_dsk_szr_header.png and /dev/null differ diff --git a/id/server/auth/src/main/webapp/img/2.0/std_handy.gif b/id/server/auth/src/main/webapp/img/2.0/std_handy.gif deleted file mode 100644 index 088ec0957..000000000 Binary files a/id/server/auth/src/main/webapp/img/2.0/std_handy.gif and /dev/null differ diff --git a/id/server/auth/src/main/webapp/img/2.0/std_karte.gif b/id/server/auth/src/main/webapp/img/2.0/std_karte.gif deleted file mode 100644 index 1ec7afc2e..000000000 Binary files a/id/server/auth/src/main/webapp/img/2.0/std_karte.gif and /dev/null differ diff --git a/id/server/auth/src/main/webapp/img/mobile-bku.png b/id/server/auth/src/main/webapp/img/mobile-bku.png new file mode 100644 index 000000000..697514273 Binary files /dev/null and b/id/server/auth/src/main/webapp/img/mobile-bku.png differ diff --git a/id/server/auth/src/main/webapp/img/online-bku.png b/id/server/auth/src/main/webapp/img/online-bku.png new file mode 100644 index 000000000..d7d524999 Binary files /dev/null and b/id/server/auth/src/main/webapp/img/online-bku.png differ diff --git a/id/server/auth/src/main/webapp/img/valid-html5-blue.png b/id/server/auth/src/main/webapp/img/valid-html5-blue.png new file mode 100644 index 000000000..91ebe3e87 Binary files /dev/null and b/id/server/auth/src/main/webapp/img/valid-html5-blue.png differ diff --git a/id/server/auth/src/main/webapp/img/w3cvalidhtml5.jpg b/id/server/auth/src/main/webapp/img/w3cvalidhtml5.jpg new file mode 100644 index 000000000..2cd65412e Binary files /dev/null and b/id/server/auth/src/main/webapp/img/w3cvalidhtml5.jpg differ diff --git a/id/server/auth/src/main/webapp/template_handyBKU.html b/id/server/auth/src/main/webapp/template_handyBKU.html index 0ad73a6f3..91f7fad6f 100644 --- a/id/server/auth/src/main/webapp/template_handyBKU.html +++ b/id/server/auth/src/main/webapp/template_handyBKU.html @@ -19,13 +19,13 @@ - - + + - + - +
diff --git a/id/server/auth/src/main/webapp/template_onlineBKU.html b/id/server/auth/src/main/webapp/template_onlineBKU.html index 8f9fce8b4..534d3dc55 100644 --- a/id/server/auth/src/main/webapp/template_onlineBKU.html +++ b/id/server/auth/src/main/webapp/template_onlineBKU.html @@ -19,12 +19,12 @@ - - + + - +
diff --git a/id/server/idserverlib/pom.xml b/id/server/idserverlib/pom.xml index 8f3dd9630..62752e9f4 100644 --- a/id/server/idserverlib/pom.xml +++ b/id/server/idserverlib/pom.xml @@ -31,12 +31,12 @@ moa-common jar - + MOA.spss.server moa-spss-lib diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java index 25f0ba1d3..84f85b3d6 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java @@ -49,6 +49,7 @@ import javax.servlet.http.HttpSession; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.TransformerException; +import org.apache.commons.lang.StringEscapeUtils; import org.apache.xpath.XPathAPI; import org.opensaml.saml2.metadata.RequestedAttribute; import org.opensaml.xml.util.Base64; @@ -212,7 +213,7 @@ public class AuthenticationServer implements MOAIDAuthConstants { * @param templateMandteURL * URL providing an HTML template for the HTML form generated * (for signing in mandates mode) - * @param scheme + * @param req * determines the protocol used * @param sourceID * @return HTML form @@ -220,7 +221,7 @@ public class AuthenticationServer implements MOAIDAuthConstants { * @see GetIdentityLinkFormBuilder * @see InfoboxReadRequestBuilder */ - public String startAuthentication(AuthenticationSession session, String scheme) throws WrongParametersException, + public String startAuthentication(AuthenticationSession session, HttpServletRequest req) throws WrongParametersException, AuthenticationException, ConfigurationException, BuildException { if (session == null) { @@ -289,9 +290,15 @@ public class AuthenticationServer implements MOAIDAuthConstants { .buildDataURL(session.getAuthURL(), REQ_START_AUTHENTICATION, session.getSessionID()); + //get Applet Parameters + String appletwidth = req.getParameter(PARAM_APPLET_WIDTH); + String appletheigth = req.getParameter(PARAM_APPLET_HEIGTH); + appletheigth = StringEscapeUtils.escapeHtml(appletheigth); + appletwidth = StringEscapeUtils.escapeHtml(appletwidth); + String htmlForm = new GetIdentityLinkFormBuilder().build(template, session.getBkuURL(), infoboxReadRequest, dataURL, certInfoRequest, - certInfoDataURL, pushInfobox, oaParam); + certInfoDataURL, pushInfobox, oaParam, appletheigth, appletwidth); return htmlForm; } diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthConstants.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthConstants.java index c17b86c46..264a4f68b 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthConstants.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthConstants.java @@ -149,4 +149,7 @@ public interface MOAIDAuthConstants { public final static String EXT_SAML_MANDATE_REPRESENTATIONTEXT = "Vollmachtsvertreter"; public final static String EXT_SAML_MANDATE_CB_BASE_ID = "MandatorDomainIdentifier"; + public static final String PARAM_APPLET_HEIGTH = "heigth"; + public static final String PARAM_APPLET_WIDTH = "width"; + } diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/GetIdentityLinkFormBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/GetIdentityLinkFormBuilder.java index ceffd90dc..7753b4011 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/GetIdentityLinkFormBuilder.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/GetIdentityLinkFormBuilder.java @@ -27,9 +27,11 @@ package at.gv.egovernment.moa.id.auth.builder; import java.io.IOException; import java.io.StringReader; import java.io.StringWriter; +import java.util.Map; import at.gv.egovernment.moa.id.auth.exception.BuildException; import at.gv.egovernment.moa.id.config.auth.OAAuthParameter; +import at.gv.egovernment.moa.id.util.FormBuildUtils; import at.gv.egovernment.moa.util.MiscUtil; /** @@ -55,9 +57,13 @@ public class GetIdentityLinkFormBuilder extends Builder { /** special tag in the HTML template to be substituted for the infoboxes to be pushed from the BKU */ private static final String PUSHINFOBOX_TAG = ""; /** special tag in the HTML template to be substituted for the BKU URL */ - private static final String COLOR_TAG = ""; /** private static int all contains the representation to replace all tags*/ private static final int ALL = -1; + + private static final String COLOR_TAG = ""; + private static final String REDIRECTTARGETTAG = ""; + private static final String APPLETWIDTH_TAG = ""; + private static final String APPLETHEIGHT_TAG = ""; /** default HTML template */ private static final String DEFAULT_HTML_TEMPLATE = @@ -115,6 +121,8 @@ public class GetIdentityLinkFormBuilder extends Builder { * may be null, in this case the default URL will be used * @param dataURL DataURL to be sent as a parameter in the form * @param oaParam + * @param appletwidth + * @param appletheigth */ public String build( String htmlTemplate, @@ -123,7 +131,9 @@ public class GetIdentityLinkFormBuilder extends Builder { String dataURL, String certInfoXMLRequest, String certInfoDataURL, - String pushInfobox, OAAuthParameter oaParam) + String pushInfobox, OAAuthParameter oaParam, + String appletheigth, + String appletwidth) throws BuildException { String htmlForm = htmlTemplate == null ? DEFAULT_HTML_TEMPLATE : htmlTemplate; @@ -136,14 +146,24 @@ public class GetIdentityLinkFormBuilder extends Builder { htmlForm = replaceTag(htmlForm, CERTINFO_DATAURL_TAG, certInfoDataURL, true, ALL); if (oaParam != null) { - if (MiscUtil.isNotEmpty(oaParam.getBKUSelectionBackGroundColor())) - htmlForm = replaceTag(htmlForm, COLOR_TAG, oaParam.getBKUSelectionBackGroundColor(), false, ALL); - else - htmlForm = replaceTag(htmlForm, COLOR_TAG, "#DDDDDD", false, ALL); - - } else - htmlForm = replaceTag(htmlForm, COLOR_TAG, "#DDDDDD", false, ALL); + Map map = oaParam.getFormCustomizaten(); + htmlForm = replaceTag(htmlForm, COLOR_TAG, map.get(FormBuildUtils.MAIN_BACKGROUNDCOLOR), false, ALL); + htmlForm = replaceTag(htmlForm, REDIRECTTARGETTAG, map.get(FormBuildUtils.REDIRECTTARGET), false, ALL); + + } else { + htmlForm = replaceTag(htmlForm, COLOR_TAG, FormBuildUtils.getDefaultMap().get(FormBuildUtils.MAIN_BACKGROUNDCOLOR), false, ALL); + htmlForm = replaceTag(htmlForm, REDIRECTTARGETTAG, FormBuildUtils.getDefaultMap().get(FormBuildUtils.REDIRECTTARGET), false, ALL); + } + + if (MiscUtil.isNotEmpty(appletheigth)) + htmlForm = replaceTag(htmlForm, APPLETHEIGHT_TAG, appletheigth, true, ALL); + else + htmlForm = replaceTag(htmlForm, APPLETHEIGHT_TAG, "160", true, ALL); + if (MiscUtil.isNotEmpty(appletwidth)) + htmlForm = replaceTag(htmlForm, APPLETWIDTH_TAG, appletwidth, true, ALL); + else + htmlForm = replaceTag(htmlForm, APPLETWIDTH_TAG, "250", true, ALL); return htmlForm; } diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/LoginFormBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/LoginFormBuilder.java index 789651f16..729af48f7 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/LoginFormBuilder.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/LoginFormBuilder.java @@ -13,6 +13,7 @@ import org.apache.commons.io.IOUtils; import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider; import at.gv.egovernment.moa.id.config.auth.OAAuthParameter; import at.gv.egovernment.moa.id.protocols.saml1.SAML1Protocol; +import at.gv.egovernment.moa.id.util.FormBuildUtils; import at.gv.egovernment.moa.logging.Logger; import at.gv.egovernment.moa.util.MiscUtil; @@ -20,12 +21,7 @@ public class LoginFormBuilder { private static final String HTMLTEMPLATESDIR = "htmlTemplates/"; private static final String HTMLTEMPLATEFULL = "loginFormFull.html"; - - private static final String TEMPLATEBGCOLOR = "style=\"background-color: #COLOR#\""; - private static final String TEMPLATEVISIBLE = " display: none"; - private static final String TEMPLATEDISABLED = "disabled=\"true\""; - private static final String TEMPLATECHECKED = "checked=\"true\""; - + private static String AUTH_URL = "#AUTH_URL#"; private static String MODUL = "#MODUL#"; private static String ACTION = "#ACTION#"; @@ -35,11 +31,7 @@ public class LoginFormBuilder { private static String BKU_LOCAL = "#LOCAL#"; private static String CONTEXTPATH = "#CONTEXTPATH#"; private static String MOASESSIONID = "#SESSIONID#"; - private static String BACKGROUNDCOLOR = "#BACKGROUNDCOLOR#"; - private static String COLOR = "#COLOR#"; - private static String MANDATEVISIBLE = "#MANDATEVISIBLE#"; - private static String MANDATECHECKED = "#MANDATECHECKED#"; - + private static String SERVLET = CONTEXTPATH+"/GenerateIframeTemplate"; private static String getTemplate() { @@ -107,24 +99,8 @@ public class LoginFormBuilder { value = value.replace(CONTEXTPATH, contextpath); value = value.replace(MOASESSIONID, moaSessionID); - String bgcolor = oaParam.getBKUSelectionBackGroundColor(); - if (MiscUtil.isNotEmpty(bgcolor)) { - value = value.replace(BACKGROUNDCOLOR, TEMPLATEBGCOLOR); - value = value.replace(COLOR, bgcolor); - } else - value = value.replace(BACKGROUNDCOLOR, ""); - - if (oaParam.isShowMandateCheckBox()) - value = value.replace(MANDATEVISIBLE, ""); - else - value = value.replace(MANDATEVISIBLE, TEMPLATEVISIBLE); - - if (oaParam.isOnlyMandateAllowed()) { - value = value.replace(MANDATECHECKED, TEMPLATECHECKED + " " + TEMPLATEDISABLED); - - } else - value = value.replace(MANDATECHECKED, ""); - + value = FormBuildUtils.customiceLayoutBKUSelection(value, oaParam); + } return value; } diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/SendAssertionFormBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/SendAssertionFormBuilder.java index cd8750ad0..1617ef796 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/SendAssertionFormBuilder.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/SendAssertionFormBuilder.java @@ -13,6 +13,7 @@ import org.apache.commons.io.IOUtils; import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider; import at.gv.egovernment.moa.id.config.auth.OAAuthParameter; import at.gv.egovernment.moa.id.protocols.saml1.SAML1Protocol; +import at.gv.egovernment.moa.id.util.FormBuildUtils; import at.gv.egovernment.moa.logging.Logger; import at.gv.egovernment.moa.util.MiscUtil; @@ -97,13 +98,8 @@ public class SendAssertionFormBuilder { value = value.replace(OANAME, oaParam.getFriendlyName()); value = value.replace(CONTEXTPATH, contextpath); - String bgcolor = oaParam.getBKUSelectionBackGroundColor(); - if (MiscUtil.isNotEmpty(bgcolor)) { - value = value.replace(BACKGROUNDCOLOR, TEMPLATEBGCOLOR); - value = value.replace(COLOR, bgcolor); - } else - value = value.replace(BACKGROUNDCOLOR, ""); - + value = FormBuildUtils.customiceLayoutBKUSelection(value, oaParam); + } return value; } diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/StartAuthenticationBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/StartAuthenticationBuilder.java index c00aa38c5..3bc152ec8 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/StartAuthenticationBuilder.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/StartAuthenticationBuilder.java @@ -48,7 +48,7 @@ public class StartAuthenticationBuilder { //normal MOA-ID authentication Logger.debug("Starting normal MOA-ID authentication"); - String getIdentityLinkForm = AuthenticationServer.getInstance().startAuthentication(moasession, req.getScheme()); + String getIdentityLinkForm = AuthenticationServer.getInstance().startAuthentication(moasession, req); return getIdentityLinkForm; } diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GenerateIFrameTemplateServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GenerateIFrameTemplateServlet.java index cdd5cd384..98ef78d53 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GenerateIFrameTemplateServlet.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GenerateIFrameTemplateServlet.java @@ -8,6 +8,8 @@ import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.apache.commons.lang.StringEscapeUtils; + import at.gv.egovernment.moa.id.auth.MOAIDAuthInitializer; import at.gv.egovernment.moa.id.auth.builder.StartAuthenticationBuilder; import at.gv.egovernment.moa.id.auth.data.AuthenticationSession; @@ -53,6 +55,8 @@ public class GenerateIFrameTemplateServlet extends AuthServlet { String useMandate = req.getParameter(PARAM_USEMANDATE); String ccc = req.getParameter(PARAM_CCC); String moasessionid = req.getParameter(PARAM_SESSIONID); + + moasessionid = StringEscapeUtils.escapeHtml(moasessionid); AuthenticationSession moasession = null; diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/OAAuthParameter.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/OAAuthParameter.java index e1f527040..3c4234114 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/OAAuthParameter.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/OAAuthParameter.java @@ -25,7 +25,9 @@ package at.gv.egovernment.moa.id.config.auth; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; import at.gv.egovernment.moa.id.commons.db.dao.config.AuthComponentOA; import at.gv.egovernment.moa.id.commons.db.dao.config.BKUSelectionCustomizationType; @@ -41,6 +43,7 @@ import at.gv.egovernment.moa.id.commons.db.dao.config.TemplatesType; import at.gv.egovernment.moa.id.commons.db.dao.config.TransformsInfoType; import at.gv.egovernment.moa.id.config.ConfigurationUtils; import at.gv.egovernment.moa.id.config.OAParameter; +import at.gv.egovernment.moa.id.util.FormBuildUtils; import at.gv.egovernment.moa.logging.Logger; import at.gv.egovernment.moa.util.MiscUtil; import eu.stork.vidp.messages.builder.STORKMessagesBuilder; @@ -235,18 +238,6 @@ public String getIdentityLinkDomainIdentifierType() { return null; } -public String getBKUSelectionBackGroundColor() { - TemplatesType templates = oa_auth.getTemplates(); - if (templates != null) { - BKUSelectionCustomizationType bkuselection = templates.getBKUSelectionCustomization(); - if (bkuselection != null) { - if (MiscUtil.isNotEmpty(bkuselection.getBackGroundColor())) - return bkuselection.getBackGroundColor(); - } - } - return null; -} - public boolean isShowMandateCheckBox() { TemplatesType templates = oa_auth.getTemplates(); @@ -272,6 +263,51 @@ public boolean isOnlyMandateAllowed() { return false; } +public Map getFormCustomizaten() { + TemplatesType templates = oa_auth.getTemplates(); + + Map map = new HashMap(); + map.putAll(FormBuildUtils.getDefaultMap()); + + if (templates != null) { + BKUSelectionCustomizationType bkuselection = templates.getBKUSelectionCustomization(); + if (bkuselection != null) { + if (MiscUtil.isNotEmpty(bkuselection.getBackGroundColor())) + map.put(FormBuildUtils.MAIN_BACKGROUNDCOLOR, bkuselection.getBackGroundColor()); + + if (MiscUtil.isNotEmpty(bkuselection.getButtonBackGroundColor())) + map.put(FormBuildUtils.BUTTON_BACKGROUNDCOLOR, bkuselection.getButtonBackGroundColor()); + + if (MiscUtil.isNotEmpty(bkuselection.getButtonBackGroundColorFocus())) + map.put(FormBuildUtils.BUTTON_BACKGROUNDCOLOR_FOCUS, bkuselection.getButtonBackGroundColorFocus()); + + if (MiscUtil.isNotEmpty(bkuselection.getButtonFontColor())) + map.put(FormBuildUtils.BUTTON_COLOR, bkuselection.getButtonFontColor()); + + if (MiscUtil.isNotEmpty(bkuselection.getFontType())) + map.put(FormBuildUtils.FONTFAMILY, bkuselection.getFontType()); + + if (MiscUtil.isNotEmpty(bkuselection.getFrontColor())) + map.put(FormBuildUtils.MAIN_COLOR, bkuselection.getFrontColor()); + + if (MiscUtil.isNotEmpty(bkuselection.getHeaderBackGroundColor())) + map.put(FormBuildUtils.HEADER_BACKGROUNDCOLOR, bkuselection.getHeaderBackGroundColor()); + + if (MiscUtil.isNotEmpty(bkuselection.getHeaderFrontColor())) + map.put(FormBuildUtils.HEADER_COLOR, bkuselection.getHeaderFrontColor()); + + if (MiscUtil.isNotEmpty(bkuselection.getHeaderText())) + map.put(FormBuildUtils.HEADER_TEXT, bkuselection.getHeaderText()); + + if (MiscUtil.isNotEmpty(bkuselection.getAppletRedirectTarget())) + map.put(FormBuildUtils.REDIRECTTARGET, bkuselection.getAppletRedirectTarget()); + + } + } + + return map; +} + /** * @return the qaaLevel */ diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/legacy/BuildFromLegacyConfig.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/legacy/BuildFromLegacyConfig.java index c7ab2d4c4..7ef043abe 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/legacy/BuildFromLegacyConfig.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/legacy/BuildFromLegacyConfig.java @@ -465,6 +465,7 @@ public class BuildFromLegacyConfig { oa_saml1.setProvideIdentityLink(oa.getProvideIdentityLink()); oa_saml1.setProvideStammzahl(oa.getProvideStammzahl()); oa_saml1.setUseCondition(oa.getUseCondition()); + oa_saml1.setIsActive(true); //OA_PVP2 OAPVP2 oa_pvp2 = new OAPVP2(); diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1Protocol.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1Protocol.java index 9d163032e..21aedb50b 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1Protocol.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1Protocol.java @@ -12,6 +12,7 @@ import at.gv.egovernment.moa.id.auth.exception.AuthenticationException; import at.gv.egovernment.moa.id.auth.exception.MOAIDException; import at.gv.egovernment.moa.id.auth.exception.WrongParametersException; import at.gv.egovernment.moa.id.auth.servlet.RedirectServlet; +import at.gv.egovernment.moa.id.commons.db.dao.config.OASAML1; import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider; import at.gv.egovernment.moa.id.config.auth.OAAuthParameter; import at.gv.egovernment.moa.id.moduls.IAction; @@ -84,9 +85,16 @@ public class SAML1Protocol implements IModulInfo, MOAIDAuthConstants { if (oaParam == null) throw new AuthenticationException("auth.00", new Object[] { oaURL }); + + OASAML1 saml1 = oaParam.getSAML1Parameter(); + if (saml1 == null || !(saml1.isIsActive() != null && saml1.isIsActive()) ) { + Logger.info("Online-Application " + oaURL + " can not use SAML1 for authentication."); + throw new AuthenticationException("auth.00", + new Object[] { oaURL }); + } config.setTarget(oaParam.getTarget()); - + request.getSession().setAttribute(PARAM_OA, oaURL); request.getSession().setAttribute(PARAM_TARGET, oaParam.getTarget()); return config; diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/FormBuildUtils.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/FormBuildUtils.java new file mode 100644 index 000000000..533957cc8 --- /dev/null +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/FormBuildUtils.java @@ -0,0 +1,82 @@ +package at.gv.egovernment.moa.id.util; + +import java.util.HashMap; +import java.util.Map; +import java.util.Set; + +import at.gv.egovernment.moa.id.config.auth.OAAuthParameter; + +public class FormBuildUtils { + + private static Map defaultmap = null; + + public static String MAIN_BACKGROUNDCOLOR = "#MAIN_BACKGOUNDCOLOR#"; + public static String MAIN_COLOR = "#MAIN_COLOR#"; + public static String HEADER_BACKGROUNDCOLOR = "#HEADER_BACKGROUNDCOLOR#"; + public static String HEADER_COLOR = "#HEADER_COLOR#"; + public static String BUTTON_BACKGROUNDCOLOR = "#BUTTON_BACKGROUNDCOLOR#"; + public static String BUTTON_BACKGROUNDCOLOR_FOCUS = "#BUTTON_BACKGROUNDCOLOR_FOCUS#"; + public static String BUTTON_COLOR = "#BUTTON_COLOR#"; + public static String FONTFAMILY = "#FONTTYPE#"; + public static String HEADER_TEXT = "#HEADER_TEXT#"; + public static String REDIRECTTARGET = "#REDIRECTTARGET#"; + + private static String MANDATEVISIBLE = "#MANDATEVISIBLE#"; + private static String MANDATECHECKED = "#MANDATECHECKED#"; + private static final String TEMPLATEVISIBLE = " display: none"; + private static final String TEMPLATEDISABLED = "disabled=\"true\""; + private static final String TEMPLATECHECKED = "checked=\"true\""; + private static final String TEMPLATE_ARIACHECKED = "aria-checked="; + + + static { + if (defaultmap == null) { + defaultmap = new HashMap(); + defaultmap.put(MAIN_BACKGROUNDCOLOR, "#F7F8F7"); + defaultmap.put(MAIN_COLOR, "#000000"); + + defaultmap.put(HEADER_BACKGROUNDCOLOR, "#C3D2E2"); + defaultmap.put(HEADER_COLOR, "#000000"); + defaultmap.put(HEADER_TEXT, "Login"); + + defaultmap.put(BUTTON_BACKGROUNDCOLOR, "#EBEBEB"); + defaultmap.put(BUTTON_BACKGROUNDCOLOR_FOCUS, "#EBEBEB"); + defaultmap.put(BUTTON_COLOR, "#000000"); + + defaultmap.put(FONTFAMILY, "Verdana, Geneva, Arial, sans-serif"); + + defaultmap.put(REDIRECTTARGET, "_top"); + } + } + + + public static String customiceLayoutBKUSelection(String value, OAAuthParameter oaParam) { + + if (oaParam.isShowMandateCheckBox()) + value = value.replace(MANDATEVISIBLE, ""); + else + value = value.replace(MANDATEVISIBLE, TEMPLATEVISIBLE); + + if (oaParam.isOnlyMandateAllowed()) { + value = value.replace(MANDATECHECKED, TEMPLATECHECKED + " " + + TEMPLATEDISABLED + " " + + TEMPLATE_ARIACHECKED + "\"true\""); + + } else + value = value.replace(MANDATECHECKED, TEMPLATE_ARIACHECKED + "\"false\""); + + Map map = oaParam.getFormCustomizaten(); + Set elements = map.keySet(); + for (String element: elements) { + value = value.replace(element, map.get(element)); + } + + return value; + } + + public static Map getDefaultMap() { + return defaultmap; + } + + +} diff --git a/id/server/idserverlib/src/main/resources/resources/templates/loginFormFull.html b/id/server/idserverlib/src/main/resources/resources/templates/loginFormFull.html index 55290d05e..efc3e8d9d 100644 --- a/id/server/idserverlib/src/main/resources/resources/templates/loginFormFull.html +++ b/id/server/idserverlib/src/main/resources/resources/templates/loginFormFull.html @@ -1,14 +1,572 @@ - - - - - - - - - - - - -
- -
- -

Anmeldung an: #OAName#

- -
-
-

- Login mit Bürgerkarte -

-
- -
- - - - - - -
i
-
- -
- -
- -
- -
- -
-
- - - - - - - - - - -

- Alternativ können Sie eine lokal installierte BKU verwenden. -

-
- - - - - -
-
-
-
- - + Anmeldung mittels Bürgerkarte oder Handy-Signatur + + +
+
+

Anmeldung an: #OAName#

+
+
+
+

#HEADER_TEXT#

+
+
+
+
+ + + +
+
+
+
+ OnlineBKU + +
+
+ HandyBKU + +
+
+
+
+ + + + + + + + +

+ Alternativ können Sie eine lokal installierte BKU verwenden. +

+
+
+ + + + +
+
+
+
+ +
+ + \ No newline at end of file diff --git a/id/server/idserverlib/src/main/resources/resources/templates/sendAssertionFormFull.html b/id/server/idserverlib/src/main/resources/resources/templates/sendAssertionFormFull.html index 1e5f4229c..cc715fa4f 100644 --- a/id/server/idserverlib/src/main/resources/resources/templates/sendAssertionFormFull.html +++ b/id/server/idserverlib/src/main/resources/resources/templates/sendAssertionFormFull.html @@ -1,47 +1,596 @@ + - - + + + + + Anmeldung an Online-Applikation
-
+
-
-
-

- Anmeldeinformationen: - -

+
+
+
+

+ Anmeldeinformationen: +

+
+ +
+

Anmeldung an: #OAName#

-
- Anmeldung an: -

#OAName#

- - -
+
- +
-
+
- +
@@ -49,6 +598,18 @@
+
diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/GetIdentityLinkFormBuilderTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/GetIdentityLinkFormBuilderTest.java index 28f7a8504..33139a2d6 100644 --- a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/GetIdentityLinkFormBuilderTest.java +++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/GetIdentityLinkFormBuilderTest.java @@ -77,7 +77,7 @@ public class GetIdentityLinkFormBuilderTest extends TestCase { String dataURL = "https://1.2.3.4/auth/VerifyIdentityLink?MOASessionID=1234567"; String infoRequest = new CertInfoVerifyXMLSignatureRequestBuilder().build(); String infoDataURL = "https://1.2.3.4/auth/StartAuthentication?Target=gb&OA=https://oa.gv.at/"; - String form = new GetIdentityLinkFormBuilder().build(null, null, xmlRequest, dataURL, infoRequest, infoDataURL, null, null); + String form = new GetIdentityLinkFormBuilder().build(null, null, xmlRequest, dataURL, infoRequest, infoDataURL, null, null, null, null); String formShould = MessageFormat.format( FORM, new Object[] { BKU, xmlRequest, dataURL, infoRequest, infoDataURL }); assertEquals(formShould, form); @@ -88,7 +88,7 @@ public class GetIdentityLinkFormBuilderTest extends TestCase { String infoRequest = new CertInfoVerifyXMLSignatureRequestBuilder().build(); String infoDataURL = "https://1.2.3.4/auth/StartAuthentication?Target=gb&OA=https://oa.gv.at/"; String bkuURL = "http://bku.at/"; - String form = new GetIdentityLinkFormBuilder().build(null, bkuURL, xmlRequest, dataURL, infoRequest, infoDataURL, null, null); + String form = new GetIdentityLinkFormBuilder().build(null, bkuURL, xmlRequest, dataURL, infoRequest, infoDataURL, null, null, null, null); String formShould = MessageFormat.format( FORM, new Object[] { bkuURL, xmlRequest, dataURL, infoRequest, infoDataURL }); assertEquals(formShould, form); diff --git a/id/server/moa-id-commons/src/main/resources/config/moaid_config_2.0.xsd b/id/server/moa-id-commons/src/main/resources/config/moaid_config_2.0.xsd index 20251d3bb..085f187ff 100644 --- a/id/server/moa-id-commons/src/main/resources/config/moaid_config_2.0.xsd +++ b/id/server/moa-id-commons/src/main/resources/config/moaid_config_2.0.xsd @@ -451,7 +451,7 @@ - + @@ -860,6 +860,7 @@ + @@ -937,6 +938,7 @@ + @@ -951,9 +953,18 @@ + - - + + + + + + + + + + - + -- cgit v1.2.3