From 2f8df725c9960c5efaaeefe7d346f6e9f693bd5e Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sun, 17 Mar 2013 16:39:50 -0300 Subject: [PATCH] Login page completed. --- .../wisemapping/webmvc/LoginController.java | 12 ++ .../wisemapping/webmvc/MindmapController.java | 1 - .../src/main/resources/messages_en.properties | 2 + .../main/webapp/WEB-INF/defs/definitions.xml | 6 + .../webapp/WEB-INF/wisemapping-security.xml | 35 +-- wise-webapp/src/main/webapp/css/openid.css | 69 ++++++ .../webapp/images/openid-providers-en.png | Bin 0 -> 15894 bytes wise-webapp/src/main/webapp/js/openid-en.js | 96 +++++++++ .../src/main/webapp/js/openid-jquery.js | 203 ++++++++++++++++++ wise-webapp/src/main/webapp/jsp/login.jsp | 1 + .../src/main/webapp/jsp/loginOpenId.jsp | 41 ++++ wise-webapp/src/main/webapp/jsp/template.jsp | 29 ++- 12 files changed, 469 insertions(+), 26 deletions(-) create mode 100644 wise-webapp/src/main/webapp/css/openid.css create mode 100644 wise-webapp/src/main/webapp/images/openid-providers-en.png create mode 100644 wise-webapp/src/main/webapp/js/openid-en.js create mode 100644 wise-webapp/src/main/webapp/js/openid-jquery.js create mode 100644 wise-webapp/src/main/webapp/jsp/loginOpenId.jsp diff --git a/wise-webapp/src/main/java/com/wisemapping/webmvc/LoginController.java b/wise-webapp/src/main/java/com/wisemapping/webmvc/LoginController.java index eb3e9021..42dd77ee 100644 --- a/wise-webapp/src/main/java/com/wisemapping/webmvc/LoginController.java +++ b/wise-webapp/src/main/java/com/wisemapping/webmvc/LoginController.java @@ -45,4 +45,16 @@ public class LoginController { return result; } + @RequestMapping(value = "loginOpenId", method = RequestMethod.GET) + protected ModelAndView showLoginOpenIdPage() { + final User user = Utils.getUser(false); + ModelAndView result; + if (user != null) { + result = new ModelAndView("forward:/c/maps/"); + } else { + result = new ModelAndView("loginOpenId"); + } + return result; + } + } diff --git a/wise-webapp/src/main/java/com/wisemapping/webmvc/MindmapController.java b/wise-webapp/src/main/java/com/wisemapping/webmvc/MindmapController.java index f15646fb..dbb81171 100644 --- a/wise-webapp/src/main/java/com/wisemapping/webmvc/MindmapController.java +++ b/wise-webapp/src/main/java/com/wisemapping/webmvc/MindmapController.java @@ -21,7 +21,6 @@ package com.wisemapping.webmvc; import com.wisemapping.exceptions.WiseMappingException; import com.wisemapping.model.CollaborationRole; -import com.wisemapping.model.MindMapHistory; import com.wisemapping.model.Mindmap; import com.wisemapping.model.User; import com.wisemapping.security.Utils; diff --git a/wise-webapp/src/main/resources/messages_en.properties b/wise-webapp/src/main/resources/messages_en.properties index e747f1b3..86a68777 100644 --- a/wise-webapp/src/main/resources/messages_en.properties +++ b/wise-webapp/src/main/resources/messages_en.properties @@ -245,6 +245,8 @@ ACCESS_HAS_BEEN_REVOKED= Upps. your access permissions to this map has been revo LICENSE=License WELCOME_TO_WISEMAPPING=Welcome to WiseMapping WELCOME_DETAILS=WiseMapping will enable you to create and read your mind maps everywhere. With WiseMapping you can: . +OPEN_ID_LOGIN=Open Id Login +LOGING_OPENID_DETAILS=Why OpenID? It's a single username and password that allows you to log in to any OpenID-enabled site. It works on thousands of websites.ItŐs an open standard.
Do you already have an account on one of these sites? Click the logo to log in with it here: DIRECT_LINK_EXPLANATION=Copy and paste the link below to share your map with colleagues TEMPORAL_PASSWORD_SENT=Your temporal password has been sent TEMPORAL_PASSWORD_SENT_DETAILS=We've sent you an email that will allow you to reset your password. Please check your email now. diff --git a/wise-webapp/src/main/webapp/WEB-INF/defs/definitions.xml b/wise-webapp/src/main/webapp/WEB-INF/defs/definitions.xml index 636b6243..0d373a47 100644 --- a/wise-webapp/src/main/webapp/WEB-INF/defs/definitions.xml +++ b/wise-webapp/src/main/webapp/WEB-INF/defs/definitions.xml @@ -75,6 +75,12 @@ + + + + + + diff --git a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml index b40b7f2d..1c6bf9eb 100644 --- a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml +++ b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml @@ -15,6 +15,7 @@ + @@ -50,26 +51,26 @@ authentication-failure-url="/c/login?login_error=2" login-processing-url="/c/j_spring_security_check"/> - - - + - - - - - + + + + + - - - - + + + + - - - - - + + + + + diff --git a/wise-webapp/src/main/webapp/css/openid.css b/wise-webapp/src/main/webapp/css/openid.css new file mode 100644 index 00000000..adea5107 --- /dev/null +++ b/wise-webapp/src/main/webapp/css/openid.css @@ -0,0 +1,69 @@ +/* + Simple OpenID Plugin + http://code.google.com/p/openid-selector/ + + This code is licensed under the New BSD License. +*/ + +#openid_form { + width: 580px; +} + +#openid_form legend { + font-weight: bold; +} + +#openid_choice { + display: none; +} + +#openid_input_area { + clear: both; + padding: 10px; +} + +#openid_btns, #openid_btns br { + clear: both; +} + +#openid_highlight { + padding: 3px; + background-color: #FFFCC9; + float: left; +} + +.openid_large_btn { + width: 100px; + height: 60px; +/* fix for IE 6 only: http://en.wikipedia.org/wiki/CSS_filter#Underscore_hack */ + _width: 102px; + _height: 62px; + + border: 1px solid #DDD; + margin: 3px; + float: left; +} + +.openid_small_btn { + width: 24px; + height: 24px; +/* fix for IE 6 only: http://en.wikipedia.org/wiki/CSS_filter#Underscore_hack */ + _width: 26px; + _height: 26px; + + border: 1px solid #DDD; + margin: 3px; + float: left; +} + +a.openid_large_btn:focus { + outline: none; +} + +a.openid_large_btn:focus { + -moz-outline-style: none; +} + +.openid_selected { + border: 4px solid #DDD; +} \ No newline at end of file diff --git a/wise-webapp/src/main/webapp/images/openid-providers-en.png b/wise-webapp/src/main/webapp/images/openid-providers-en.png new file mode 100644 index 0000000000000000000000000000000000000000..f5fd7288cb8aa4f22b0a958f7c5f51365ab7d697 GIT binary patch literal 15894 zcmch;bx>SQ^euXD2$I3wB|va@2<{f#CAhm=g1ZEQ6WraMV1pCf-Ccs~o$prtZq==N z@6Y$TX3jY^)m?R}XZKobuiYJ?tSE*0f#3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s!2+Jv1fnon~rUWW{+?-c#UJMbv^*SA-Or<>m|l4hNC8{w!mQtpAr&s)&QC?6{ZV^m5lnf1Phd{oCh7&KKc;ZJHm_#Nvb!-H(^nIH zjK-XJTY5X0A=dK*V0%a&)h;(pfF7!<{>#U)w|h9#jn>?R_0Ip)Co1uNim{ej>jgf3 zqdHl#2_6Ltx(&J3Me#1B@Wa^+sY_GGz;FQ%MvXfx1AvkD@qVK|ROoj0tMJ*`^ zTkyZz&54Iib)P`vrW+Ah<|^g_wqdT|HJ8)k-p;3Yc4`#{8mS3IRj>QPbhm?h;ttQJ{(kCeh4+JJV)?bDig@#) zy6KMgFAt^_yIR~93u?oszG;kakn$rX-~Kb|Nu50lZGTVx z&p60%TI)Ba5p*+e{Cz}Z&+Q_rT0x+MBHya4&wextm+UDR%kLBjWda~g3A3M@iIta? z8Teie?C$Q;eJuj@pUH1bxzQK=Ac=hL%vCt_Nd!IqO22M~Z>HSJ-Y9ejC06B3@?JA+=`pwwYjL+2B z3~~e5SXfyY|NHQ$v9R%R^6;_nd}d+iV__L$48Qun2G}`#voiPke;?55$f5ul0LVxv KidTsmeg9vZk@$}Q literal 0 HcmV?d00001 diff --git a/wise-webapp/src/main/webapp/js/openid-en.js b/wise-webapp/src/main/webapp/js/openid-en.js new file mode 100644 index 00000000..2b68c665 --- /dev/null +++ b/wise-webapp/src/main/webapp/js/openid-en.js @@ -0,0 +1,96 @@ +/* + Simple OpenID Plugin + http://code.google.com/p/openid-selector/ + + This code is licensed under the New BSD License. +*/ + +var providers_large = { + google : { + name : 'Google', + url : 'https://www.google.com/accounts/o8/id' + }, + yahoo : { + name : 'Yahoo', + url : 'http://me.yahoo.com/' + }, + aol : { + name : 'AOL', + label : 'Enter your AOL screenname.', + url : 'http://openid.aol.com/{username}' + }, + myopenid : { + name : 'MyOpenID', + label : 'Enter your MyOpenID username.', + url : 'http://{username}.myopenid.com/' + }, + openid : { + name : 'OpenID', + label : 'Enter your OpenID.', + url : null + } +}; + +var providers_small = { + livejournal : { + name : 'LiveJournal', + label : 'Enter your Livejournal username.', + url : 'http://{username}.livejournal.com/' + }, + /* flickr: { + name: 'Flickr', + label: 'Enter your Flickr username.', + url: 'http://flickr.com/{username}/' + }, */ + /* technorati: { + name: 'Technorati', + label: 'Enter your Technorati username.', + url: 'http://technorati.com/people/technorati/{username}/' + }, */ + wordpress : { + name : 'Wordpress', + label : 'Enter your Wordpress.com username.', + url : 'http://{username}.wordpress.com/' + }, + blogger : { + name : 'Blogger', + label : 'Your Blogger account', + url : 'http://{username}.blogspot.com/' + }, + verisign : { + name : 'Verisign', + label : 'Your Verisign username', + url : 'http://{username}.pip.verisignlabs.com/' + }, + /* vidoop: { + name: 'Vidoop', + label: 'Your Vidoop username', + url: 'http://{username}.myvidoop.com/' + }, */ + /* launchpad: { + name: 'Launchpad', + label: 'Your Launchpad username', + url: 'https://launchpad.net/~{username}' + }, */ + claimid : { + name : 'ClaimID', + label : 'Your ClaimID username', + url : 'http://claimid.com/{username}' + }, + clickpass : { + name : 'ClickPass', + label : 'Enter your ClickPass username', + url : 'http://clickpass.com/public/{username}' + }, + google_profile : { + name : 'Google Profile', + label : 'Enter your Google Profile username', + url : 'http://www.google.com/profiles/{username}' + } +}; + +openid.locale = 'en'; +openid.sprite = 'en'; // reused in german& japan localization +openid.demo_text = 'In client demo mode. Normally would have submitted OpenID:'; +openid.signin_text = 'Sign-In'; +openid.image_title = 'log in with {provider}'; diff --git a/wise-webapp/src/main/webapp/js/openid-jquery.js b/wise-webapp/src/main/webapp/js/openid-jquery.js new file mode 100644 index 00000000..085ab3a8 --- /dev/null +++ b/wise-webapp/src/main/webapp/js/openid-jquery.js @@ -0,0 +1,203 @@ +/* + Simple OpenID Plugin + http://code.google.com/p/openid-selector/ + + This code is licensed under the New BSD License. + */ + +var providers; +var openid; +(function ($) { + openid = { + version: '1.3', // version constant + demo: false, + demo_text: null, + cookie_expires: 6 * 30, // 6 months. + cookie_name: 'openid_provider', + cookie_path: '/', + + img_path: 'images/', + locale: null, // is set in openid-.js + sprite: null, // usually equals to locale, is set in + // openid-.js + signin_text: null, // text on submit button on the form + all_small: false, // output large providers w/ small icons + no_sprite: false, // don't use sprite image + image_title: '{provider}', // for image title + + input_id: null, + provider_url: null, + provider_id: null, + + /** + * Class constructor + * + * @return {Void} + */ + init: function (input_id) { + providers = $.extend({}, providers_large, providers_small); + var openid_btns = $('#openid_btns'); + this.input_id = input_id; + $('#openid_choice').show(); + $('#openid_input_area').empty(); + var i = 0; + // add box for each provider + var id, box; + for (id in providers_large) { + box = this.getBoxHTML(id, providers_large[id], (this.all_small ? 'small' : 'large'), i++); + openid_btns.append(box); + } + if (providers_small) { + openid_btns.append('
'); + for (id in providers_small) { + box = this.getBoxHTML(id, providers_small[id], 'small', i++); + openid_btns.append(box); + } + } + $('#openid_form').submit(this.submit); + var box_id = this.readCookie(); + if (box_id) { + this.signin(box_id, true); + } + }, + + /** + * @return {String} + */ + getBoxHTML: function (box_id, provider, box_size, index) { + if (this.no_sprite) { + var image_ext = box_size == 'small' ? '.ico.gif' : '.gif'; + return ''; + } + var x = box_size == 'small' ? -index * 24 : -index * 100; + var y = box_size == 'small' ? -60 : 0; + return ''; + }, + + /** + * Provider image click + * + * @return {Void} + */ + signin: function (box_id, onload) { + var provider = providers[box_id]; + if (!provider) { + return; + } + this.highlight(box_id); + this.setCookie(box_id); + this.provider_id = box_id; + this.provider_url = provider.url; + // prompt user for input? + if (provider.label) { + this.useInputBox(provider); + } else { + $('#openid_input_area').empty(); + if (!onload) { + $('#openid_form').submit(); + } + } + }, + + /** + * Sign-in button click + * + * @return {Boolean} + */ + submit: function () { + var url = openid.provider_url; + if (url) { + url = url.replace('{username}', $('#openid_username').val()); + openid.setOpenIdUrl(url); + } + if (openid.demo) { + alert(openid.demo_text + "\r\n" + document.getElementById(openid.input_id).value); + return false; + } + if (url && url.indexOf("javascript:") == 0) { + url = url.substr("javascript:".length); + eval(url); + return false; + } + return true; + }, + + /** + * @return {Void} + */ + setOpenIdUrl: function (url) { + var hidden = document.getElementById(this.input_id); + if (hidden != null) { + hidden.value = url; + } else { + $('#openid_form').append(''); + } + }, + + /** + * @return {Void} + */ + highlight: function (box_id) { + // remove previous highlight. + var highlight = $('#openid_highlight'); + if (highlight) { + highlight.replaceWith($('#openid_highlight a')[0]); + } + // add new highlight. + $('.' + box_id).wrap('

'); + }, + + setCookie: function (value) { + var date = new Date(); + date.setTime(date.getTime() + (this.cookie_expires * 24 * 60 * 60 * 1000)); + var expires = "; expires=" + date.toGMTString(); + document.cookie = this.cookie_name + "=" + value + expires + "; path=" + this.cookie_path; + }, + + readCookie: function () { + var nameEQ = this.cookie_name + "="; + var ca = document.cookie.split(';'); + for (var i = 0; i < ca.length; i++) { + var c = ca[i]; + while (c.charAt(0) == ' ') + c = c.substring(1, c.length); + if (c.indexOf(nameEQ) == 0) + return c.substring(nameEQ.length, c.length); + } + return null; + }, + + /** + * @return {Void} + */ + useInputBox: function (provider) { + var input_area = $('#openid_input_area'); + var html = ''; + var id = 'openid_username'; + var value = ''; + var label = provider.label; + var style = ''; + if (label) { + html = '

' + label + '

'; + } + if (provider.name == 'OpenID') { + id = this.input_id; + value = 'http://'; + style = 'background: #FFF url(' + this.img_path + 'openid-inputicon.gif) no-repeat scroll 0 50%; padding-left:18px;'; + } + html += '' + + ''; + input_area.empty(); + input_area.append(html); + $('#' + id).focus(); + }, + + setDemoMode: function (demoMode) { + this.demo = demoMode; + } + }; +})(jQuery); diff --git a/wise-webapp/src/main/webapp/jsp/login.jsp b/wise-webapp/src/main/webapp/jsp/login.jsp index 1ba2adf1..a6e6d0a5 100644 --- a/wise-webapp/src/main/webapp/jsp/login.jsp +++ b/wise-webapp/src/main/webapp/jsp/login.jsp @@ -49,6 +49,7 @@ "> +
diff --git a/wise-webapp/src/main/webapp/jsp/loginOpenId.jsp b/wise-webapp/src/main/webapp/jsp/loginOpenId.jsp new file mode 100644 index 00000000..9101c335 --- /dev/null +++ b/wise-webapp/src/main/webapp/jsp/loginOpenId.jsp @@ -0,0 +1,41 @@ +<%@page pageEncoding="UTF-8" %> +<%@ include file="/jsp/init.jsp" %> + +<%--@elvariable id="isHsql" type="boolean"--%> + + + +
+

+ +
+
+
+
+ +
+
+
+
+
+
+ + +
+ +
+
+ +
+
\ No newline at end of file diff --git a/wise-webapp/src/main/webapp/jsp/template.jsp b/wise-webapp/src/main/webapp/jsp/template.jsp index cc4ddeb7..a6d6e565 100644 --- a/wise-webapp/src/main/webapp/jsp/template.jsp +++ b/wise-webapp/src/main/webapp/jsp/template.jsp @@ -14,13 +14,15 @@ - - - - - - - + + + + + + + <spring:message code="SITE.TITLE"/>- @@ -38,9 +40,20 @@ <link rel="icon" href="images/favicon.ico" type="image/x-icon"/> <link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon"/> - <script type="text/javascript" language="javascript" src="js/jquery-1.7.2.min.js"></script> <script type="text/javascript" language="javascript" src="bootstrap/js/bootstrap.js"></script> <script src="js/less.js" type="text/javascript"></script> + + <!-- Simple OpenID Selector --> + <link type="text/css" rel="stylesheet" href="css/openid.css"/> + <script type="text/javascript" language="javascript" src="js/jquery-1.7.2.min.js"></script> + <script type="text/javascript" language="javascript" src="js/openid-jquery.js"></script> + <script type="text/javascript" language="javascript" src="js/openid-en.js"></script> + <!-- /Simple OpenID Selector --> + <script type="text/javascript"> + $(document).ready(function() { + openid.init('openid_identifier'); + }); + </script> </head> <body>