diff --git a/examples/demo/site/modules/auth/files/js/roc_auth.js b/examples/demo/site/modules/auth/files/js/roc_auth.js deleted file mode 100644 index e4b499a..0000000 --- a/examples/demo/site/modules/auth/files/js/roc_auth.js +++ /dev/null @@ -1,323 +0,0 @@ -var ROC_AUTH = ROC_AUTH || { }; - -var loginURL = "/basic_auth_login"; -var logoutURL = "/basic_auth_logoff"; - -var userAgent = navigator.userAgent.toLowerCase(); -var firstLogIn = true; - -ROC_AUTH.login = function() { - var form = document.forms[0]; - var username = form.username.value; - var password = form.password.value; - //var host = form.host.value; - var origin = window.location.origin.concat(window.location.pathname); - var _login = function(){ - - - if (document.getElementById('myModalFormId') !== null ) { - ROC_AUTH.remove ('myModalFormId'); - } - - - if (username === "" || password === "") { - if (document.getElementById('myModalFormId') === null ) { - var newdiv = document.createElement('div'); - newdiv.innerHTML = "
Invalid Credentials
"; - newdiv.id = 'myModalFormId'; - $("body").append(newdiv); - } - }else{ - - //Instantiate HTTP Request - var request = ((window.XMLHttpRequest) ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP")); - request.open("GET", loginURL, true, username, password); - request.send(null); - - //Process Response - request.onreadystatechange = function(){ - if (request.readyState == 4) { - if (request.status==200) { - delete form; - window.location=window.location.origin; - } - else{ - if (navigator.userAgent.toLowerCase().indexOf("firefox") != -1){ - } - - if (document.getElementById('myModalFormId') === null ) { - var newdiv = document.createElement('div'); - newdiv.innerHTML = "
Invalid Credentials
"; - newdiv.id = 'myModalFormId'; - $("body").append(newdiv); - } - - } - } - } - } - } - - var userAgent = navigator.userAgent.toLowerCase(); - if (userAgent.indexOf("firefox") != -1){ //TODO: check version number - if (firstLogIn) _login(); - else logoff(_login); - } - else{ - _login(); - } - - if (firstLogIn) firstLogIn = false; -}; - - -ROC_AUTH.login_with_redirect = function() { - var form = document.forms[2]; - var username = form.username.value; - var password = form.password.value; - var host = form.host.value; - var _login = function(){ - - var redirectURL = form.redirect && form.redirect.value || ""; - - - $("#imgProgressRedirect").show(); - - if (document.getElementById('myModalFormId') !== null ) { - ROC_AUTH.remove ('myModalFormId'); - } - - - if (username === "" || password === "") { - if (document.getElementById('myModalFormId') === null ) { - var newdiv = document.createElement('div'); - newdiv.innerHTML = "
Invalid Credentials
"; - newdiv.id = 'myModalFormId'; - $("body").append(newdiv); - $("#imgProgressRedirect").hide(); - } - }else{ - - //Instantiate HTTP Request - var request = ((window.XMLHttpRequest) ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP")); - request.open("GET", host.concat(loginURL), true, username, password); - request.send(null); - - //Process Response - request.onreadystatechange = function(){ - if (request.readyState == 4) { - if (request.status==200) { - if (redirectURL === "") { - window.location=host.concat("/"); - } else { - window.location=host.concat(redirectURL); - } - - } - else{ - if (navigator.userAgent.toLowerCase().indexOf("firefox") != -1){ - } - - if (document.getElementById('myModalFormId') === null ) { - var newdiv = document.createElement('div'); - newdiv.innerHTML = "
Invalid Credentials
"; - newdiv.id = 'myModalFormId'; - $("body").append(newdiv); - $("#imgProgressRedirect").hide(); - } - - } - } - } - } - } - - var userAgent = navigator.userAgent.toLowerCase(); - if (userAgent.indexOf("firefox") != -1){ //TODO: check version number - if (firstLogIn) _login(); - else logoff(_login); - } - else{ - _login(); - } - - if (firstLogIn) firstLogIn = false; -}; - - -ROC_AUTH.getQueryParameterByName = function (name) { - name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); - var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), - results = regex.exec(location.search); - return results === null ? " " : decodeURIComponent(results[1].replace(/\+/g, " ")); -} - -ROC_AUTH.logoff = function(callback){ - var form = document.forms[0]; - var host = form.host.value; - - if (userAgent.indexOf("msie") != -1) { - document.execCommand("ClearAuthenticationCache"); - } - else if (userAgent.indexOf("firefox") != -1){ //TODO: check version number - - var request1 = new XMLHttpRequest(); - var request2 = new XMLHttpRequest(); - - //Logout. Tell the server not to return the "WWW-Authenticate" header - request1.open("GET", host.concat(logoutURL) + "?prompt=false", true); - request1.send(""); - request1.onreadystatechange = function(){ - if (request1.readyState == 4) { - - //Sign in with dummy credentials to clear the auth cache - request2.open("GET", host.concat(logoutURL), true, "logout", "logout"); - request2.send(""); - - request2.onreadystatechange = function(){ - if (request2.readyState == 4) { - if (callback!=null) { callback.call(); } else { window.location=host.concat(logoutURL);} - } - } - - } - } - } - else { - var request = ((window.XMLHttpRequest) ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP")); - request.open("GET", host.concat(logoutURL), true, "logout", "logout"); - request.send(""); - request.onreadystatechange = function(){ - if (request.status==401 || request.status==403 ) { window.location=host.concat(logoutURL); - } - } - } -}; - - -ROC_AUTH.remove = function (id) -{ - var element = document.getElementById(id); - element.outerHTML = ""; - delete element; - return; -}; - - - -$(document).ready(function() { - - if (typeof String.prototype.contains != 'function') { - String.prototype.contains = function (str){ - return this.indexOf(str) != -1; - }; - } - ROC_AUTH.progressive_loging(); - -}); - - -ROC_AUTH.progressive_loging = function () { - - ROC_AUTH.login_href(); -}; - - -$(document).keypress(function(e) { - if ((e.which === 13) && (e.target.localName === 'input' && e.target.id === 'password')) { - ROC_AUTH.login(); - } -}); - -ROC_AUTH.OnOneClick = function(event) { - event.preventDefault(); - if ( document.forms[0] === undefined ) { - ROC_AUTH.create_form(); - } - return false; -}; - -ROC_AUTH.login_href = function() { - var els = document.getElementsByTagName("a"); - for (var i = 0, l = els.length; i < l; i++) { - var el = els[i]; - if (el.href.contains("/basic_auth_login?destination")) { - loginURL = el.href; - var OneClick = el; - OneClick.addEventListener('click', ROC_AUTH.OnOneClick, false); - } - } -}; - - -ROC_AUTH.create_form = function() { - - // Fetching HTML Elements in Variables by ID. - var createform = document.createElement('form'); // Create New Element Form - createform.setAttribute("action", ""); // Setting Action Attribute on Form - createform.setAttribute("method", "post"); // Setting Method Attribute on Form - $("body").append(createform); - - var heading = document.createElement('h2'); // Heading of Form - heading.innerHTML = "Login Form "; - createform.appendChild(heading); - - var line = document.createElement('hr'); // Giving Horizontal Row After Heading - createform.appendChild(line); - - var linebreak = document.createElement('br'); - createform.appendChild(linebreak); - - var namelabel = document.createElement('label'); // Create Label for Name Field - namelabel.innerHTML = "Username : "; // Set Field Labels - createform.appendChild(namelabel); - - var inputelement = document.createElement('input'); // Create Input Field for UserName - inputelement.setAttribute("type", "text"); - inputelement.setAttribute("name", "username"); - inputelement.setAttribute("required","required"); - createform.appendChild(inputelement); - - var linebreak = document.createElement('br'); - createform.appendChild(linebreak); - - var passwordlabel = document.createElement('label'); // Create Label for Password Field - passwordlabel.innerHTML = "Password : "; - createform.appendChild(passwordlabel); - - var passwordelement = document.createElement('input'); // Create Input Field for Password. - passwordelement.setAttribute("type", "password"); - passwordelement.setAttribute("name", "password"); - passwordelement.setAttribute("id", "password"); - passwordelement.setAttribute("required","required"); - createform.appendChild(passwordelement); - - - var passwordbreak = document.createElement('br'); - createform.appendChild(passwordbreak); - - - var submitelement = document.createElement('button'); // Append Submit Button - submitelement.setAttribute("type", "button"); - submitelement.setAttribute("onclick", "ROC_AUTH.login();"); - submitelement.innerHTML = "Sign In "; - createform.appendChild(submitelement); - -}; - - -var password = document.getElementById("password") - , confirm_password = document.getElementById("confirm_password"); - -ROC_AUTH.validatePassword =function(){ - if ((password != null) && (confirm_password != null)){ - if(password.value != confirm_password.value) { - confirm_password.setCustomValidity("Passwords Don't Match"); - } else { - confirm_password.setCustomValidity(''); - } - } -} - -password.onchange = ROC_AUTH.validatePassword(); -confirm_password.onkeyup = ROC_AUTH.validatePassword; \ No newline at end of file diff --git a/examples/demo/site/modules/basic_auth/files/js/roc_auth.js b/examples/demo/site/modules/basic_auth/files/js/roc_basic_auth.js similarity index 100% rename from examples/demo/site/modules/basic_auth/files/js/roc_auth.js rename to examples/demo/site/modules/basic_auth/files/js/roc_basic_auth.js diff --git a/examples/demo/src/ewf_roc_server_execution.e b/examples/demo/src/ewf_roc_server_execution.e index dbe0751..5b62f8e 100644 --- a/examples/demo/src/ewf_roc_server_execution.e +++ b/examples/demo/src/ewf_roc_server_execution.e @@ -59,7 +59,7 @@ feature -- CMS setup m.enable a_setup.register_module (m) - create {BASIC_AUTH_MODULE} m.make + create {CMS_BASIC_AUTH_MODULE} m.make m.enable a_setup.register_module (m) diff --git a/modules/auth/cms_authentication_module.e b/modules/auth/cms_authentication_module.e index 8336301..a809371 100644 --- a/modules/auth/cms_authentication_module.e +++ b/modules/auth/cms_authentication_module.e @@ -606,10 +606,6 @@ feature {NONE} -- Block views end end - - - - note copyright: "Copyright (c) 1984-2013, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" diff --git a/modules/basic_auth/basic_auth_module.e b/modules/basic_auth/cms_basic_auth_module.e similarity index 95% rename from modules/basic_auth/basic_auth_module.e rename to modules/basic_auth/cms_basic_auth_module.e index b2308ef..005cc07 100644 --- a/modules/basic_auth/basic_auth_module.e +++ b/modules/basic_auth/cms_basic_auth_module.e @@ -7,7 +7,7 @@ note revision: "$Revision: 96596 $" class - BASIC_AUTH_MODULE + CMS_BASIC_AUTH_MODULE inherit CMS_MODULE @@ -60,15 +60,15 @@ feature -- Access: filter -- Possibly list of Filter's module. do create {ARRAYED_LIST [WSF_FILTER]} Result.make (2) - Result.extend (create {CORS_FILTER}) - Result.extend (create {BASIC_AUTH_FILTER}.make (a_api)) + Result.extend (create {CMS_CORS_FILTER}) + Result.extend (create {CMS_BASIC_AUTH_FILTER}.make (a_api)) end feature {NONE} -- Implementation: routes configure_api_login (api: CMS_API; a_router: WSF_ROUTER) local - l_bal_handler: BASIC_AUTH_LOGIN_HANDLER + l_bal_handler: CMS_BASIC_AUTH_LOGIN_HANDLER l_methods: WSF_REQUEST_METHODS do create l_bal_handler.make (api) @@ -79,7 +79,7 @@ feature {NONE} -- Implementation: routes configure_api_logoff (api: CMS_API; a_router: WSF_ROUTER) local - l_bal_handler: BASIC_AUTH_LOGOFF_HANDLER + l_bal_handler: CMS_BASIC_AUTH_LOGOFF_HANDLER l_methods: WSF_REQUEST_METHODS do create l_bal_handler.make (api) @@ -175,7 +175,7 @@ feature -- Hooks a_block_id.is_case_insensitive_equal_general ("login") and then a_response.location.starts_with ("account/roc-basic-auth") then - a_response.add_javascript_url (a_response.url ("module/" + name + "/files/js/roc_auth.js", Void)) + a_response.add_javascript_url (a_response.url ("module/" + name + "/files/js/roc_basic_auth.js", Void)) get_block_view_login (a_block_id, a_response) end end diff --git a/modules/basic_auth/filter/basic_auth_filter.e b/modules/basic_auth/filter/cms_basic_auth_filter.e similarity index 98% rename from modules/basic_auth/filter/basic_auth_filter.e rename to modules/basic_auth/filter/cms_basic_auth_filter.e index f2b3b40..2b866ff 100644 --- a/modules/basic_auth/filter/basic_auth_filter.e +++ b/modules/basic_auth/filter/cms_basic_auth_filter.e @@ -6,7 +6,7 @@ note revision: "$Revision: 96616 $" class - BASIC_AUTH_FILTER + CMS_BASIC_AUTH_FILTER inherit WSF_URI_TEMPLATE_HANDLER diff --git a/modules/basic_auth/filter/cors_filter.e b/modules/basic_auth/filter/cms_cors_filter.e similarity index 97% rename from modules/basic_auth/filter/cors_filter.e rename to modules/basic_auth/filter/cms_cors_filter.e index 370a545..9c8a151 100644 --- a/modules/basic_auth/filter/cors_filter.e +++ b/modules/basic_auth/filter/cms_cors_filter.e @@ -4,7 +4,7 @@ note revision: "$Revision: 96085 $" class - CORS_FILTER + CMS_CORS_FILTER inherit diff --git a/modules/basic_auth/handler/basic_auth_login_handler.e b/modules/basic_auth/handler/cms_basic_auth_login_handler.e similarity index 93% rename from modules/basic_auth/handler/basic_auth_login_handler.e rename to modules/basic_auth/handler/cms_basic_auth_login_handler.e index c92b024..00a4ba4 100644 --- a/modules/basic_auth/handler/basic_auth_login_handler.e +++ b/modules/basic_auth/handler/cms_basic_auth_login_handler.e @@ -1,10 +1,10 @@ note - description: "Summary description for {BASIC_AUTH_LOGIN_HANDLER}." + description: "Summary description for {CMS_BASIC_AUTH_LOGIN_HANDLER}." date: "$Date: 2015-02-13 13:08:13 +0100 (ven., 13 févr. 2015) $" revision: "$Revision: 96616 $" class - BASIC_AUTH_LOGIN_HANDLER + CMS_BASIC_AUTH_LOGIN_HANDLER inherit CMS_HANDLER diff --git a/modules/basic_auth/handler/basic_auth_logoff_handler.e b/modules/basic_auth/handler/cms_basic_auth_logoff_handler.e similarity index 97% rename from modules/basic_auth/handler/basic_auth_logoff_handler.e rename to modules/basic_auth/handler/cms_basic_auth_logoff_handler.e index 5e8a667..b5d321c 100644 --- a/modules/basic_auth/handler/basic_auth_logoff_handler.e +++ b/modules/basic_auth/handler/cms_basic_auth_logoff_handler.e @@ -1,10 +1,10 @@ note - description: "Summary description for {BASIC_AUTH_LOGOFF_HANDLER}." + description: "Summary description for {CMS_BASIC_AUTH_LOGOFF_HANDLER}." date: "$Date: 2015-02-13 13:08:13 +0100 (ven., 13 févr. 2015) $" revision: "$Revision: 96616 $" class - BASIC_AUTH_LOGOFF_HANDLER + CMS_BASIC_AUTH_LOGOFF_HANDLER inherit CMS_HANDLER diff --git a/modules/basic_auth/site/files/js/roc_auth.js b/modules/basic_auth/site/files/js/roc_auth.js deleted file mode 100644 index 75382ef..0000000 --- a/modules/basic_auth/site/files/js/roc_auth.js +++ /dev/null @@ -1,321 +0,0 @@ -var ROC_AUTH = ROC_AUTH || { }; - -var loginURL = "/basic_auth_login"; -var logoutURL = "/basic_auth_logoff"; - -var userAgent = navigator.userAgent.toLowerCase(); -var firstLogIn = true; - -ROC_AUTH.login = function() { - var form = document.forms[0]; - var username = form.username.value; - var password = form.password.value; - //var host = form.host.value; - var origin = window.location.origin.concat(window.location.pathname); - var _login = function(){ - - - if (document.getElementById('myModalFormId') !== null ) { - ROC_AUTH.remove ('myModalFormId'); - } - - - if (username === "" || password === "") { - if (document.getElementById('myModalFormId') === null ) { - var newdiv = document.createElement('div'); - newdiv.innerHTML = "
Invalid Credentials
"; - newdiv.id = 'myModalFormId'; - $("body").append(newdiv); - } - }else{ - - //Instantiate HTTP Request - var request = ((window.XMLHttpRequest) ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP")); - request.open("GET", loginURL, true, username, password); - request.send(null); - - //Process Response - request.onreadystatechange = function(){ - if (request.readyState == 4) { - if (request.status==200) { - delete form; - window.location=origin; - } - else{ - if (navigator.userAgent.toLowerCase().indexOf("firefox") != -1){ - } - - if (document.getElementById('myModalFormId') === null ) { - var newdiv = document.createElement('div'); - newdiv.innerHTML = "
Invalid Credentials
"; - newdiv.id = 'myModalFormId'; - $("body").append(newdiv); - } - - } - } - } - } - } - - var userAgent = navigator.userAgent.toLowerCase(); - if (userAgent.indexOf("firefox") != -1){ //TODO: check version number - if (firstLogIn) _login(); - else logoff(_login); - } - else{ - _login(); - } - - if (firstLogIn) firstLogIn = false; -}; - - -ROC_AUTH.login_with_redirect = function() { - var form = document.forms[2]; - var username = form.username.value; - var password = form.password.value; - var host = form.host.value; - var _login = function(){ - - var redirectURL = form.redirect && form.redirect.value || ""; - - - $("#imgProgressRedirect").show(); - - if (document.getElementById('myModalFormId') !== null ) { - ROC_AUTH.remove ('myModalFormId'); - } - - - if (username === "" || password === "") { - if (document.getElementById('myModalFormId') === null ) { - var newdiv = document.createElement('div'); - newdiv.innerHTML = "
Invalid Credentials
"; - newdiv.id = 'myModalFormId'; - $("body").append(newdiv); - $("#imgProgressRedirect").hide(); - } - }else{ - - //Instantiate HTTP Request - var request = ((window.XMLHttpRequest) ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP")); - request.open("GET", host.concat(loginURL), true, username, password); - request.send(null); - - //Process Response - request.onreadystatechange = function(){ - if (request.readyState == 4) { - if (request.status==200) { - if (redirectURL === "") { - window.location=host.concat("/"); - } else { - window.location=host.concat(redirectURL); - } - - } - else{ - if (navigator.userAgent.toLowerCase().indexOf("firefox") != -1){ - } - - if (document.getElementById('myModalFormId') === null ) { - var newdiv = document.createElement('div'); - newdiv.innerHTML = "
Invalid Credentials
"; - newdiv.id = 'myModalFormId'; - $("body").append(newdiv); - $("#imgProgressRedirect").hide(); - } - - } - } - } - } - } - - var userAgent = navigator.userAgent.toLowerCase(); - if (userAgent.indexOf("firefox") != -1){ //TODO: check version number - if (firstLogIn) _login(); - else logoff(_login); - } - else{ - _login(); - } - - if (firstLogIn) firstLogIn = false; -}; - - -ROC_AUTH.getQueryParameterByName = function (name) { - name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); - var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), - results = regex.exec(location.search); - return results === null ? " " : decodeURIComponent(results[1].replace(/\+/g, " ")); -} - -ROC_AUTH.logoff = function(callback){ - var form = document.forms[0]; - var host = form.host.value; - - if (userAgent.indexOf("msie") != -1) { - document.execCommand("ClearAuthenticationCache"); - } - else if (userAgent.indexOf("firefox") != -1){ //TODO: check version number - - var request1 = new XMLHttpRequest(); - var request2 = new XMLHttpRequest(); - - //Logout. Tell the server not to return the "WWW-Authenticate" header - request1.open("GET", host.concat(logoutURL) + "?prompt=false", true); - request1.send(""); - request1.onreadystatechange = function(){ - if (request1.readyState == 4) { - - //Sign in with dummy credentials to clear the auth cache - request2.open("GET", host.concat(logoutURL), true, "logout", "logout"); - request2.send(""); - - request2.onreadystatechange = function(){ - if (request2.readyState == 4) { - if (callback!=null) { callback.call(); } else { window.location=host.concat(logoutURL);} - } - } - - } - } - } - else { - var request = ((window.XMLHttpRequest) ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP")); - request.open("GET", host.concat(logoutURL), true, "logout", "logout"); - request.send(""); - request.onreadystatechange = function(){ - if (request.status==401 || request.status==403 ) { window.location=host.concat(logoutURL); - } - } - } -}; - - -ROC_AUTH.remove = function (id) -{ - var element = document.getElementById(id); - element.outerHTML = ""; - delete element; - return; -}; - - - -$(document).ready(function() { - - if (typeof String.prototype.contains != 'function') { - String.prototype.contains = function (str){ - return this.indexOf(str) != -1; - }; - } - ROC_AUTH.progressive_loging(); - -}); - - -ROC_AUTH.progressive_loging = function () { - - ROC_AUTH.login_href(); -}; - - -$(document).keypress(function(e) { - if ((e.which === 13) && (e.target.localName === 'input' && e.target.id === 'password')) { - ROC_AUTH.login(); - } -}); - -ROC_AUTH.OnOneClick = function(event) { - event.preventDefault(); - if ( document.forms[0] === undefined ) { - ROC_AUTH.create_form(); - } - return false; -}; - -ROC_AUTH.login_href = function() { - var els = document.getElementsByTagName("a"); - for (var i = 0, l = els.length; i < l; i++) { - var el = els[i]; - if (el.href.contains("/basic_auth_login?destination")) { - loginURL = el.href; - var OneClick = el; - OneClick.addEventListener('click', ROC_AUTH.OnOneClick, false); - } - } -}; - - -ROC_AUTH.create_form = function() { - - // Fetching HTML Elements in Variables by ID. - var createform = document.createElement('form'); // Create New Element Form - createform.setAttribute("action", ""); // Setting Action Attribute on Form - createform.setAttribute("method", "post"); // Setting Method Attribute on Form - $("body").append(createform); - - var heading = document.createElement('h2'); // Heading of Form - heading.innerHTML = "Login Form "; - createform.appendChild(heading); - - var line = document.createElement('hr'); // Giving Horizontal Row After Heading - createform.appendChild(line); - - var linebreak = document.createElement('br'); - createform.appendChild(linebreak); - - var namelabel = document.createElement('label'); // Create Label for Name Field - namelabel.innerHTML = "Username : "; // Set Field Labels - createform.appendChild(namelabel); - - var inputelement = document.createElement('input'); // Create Input Field for UserName - inputelement.setAttribute("type", "text"); - inputelement.setAttribute("name", "username"); - inputelement.setAttribute("required","required"); - createform.appendChild(inputelement); - - var linebreak = document.createElement('br'); - createform.appendChild(linebreak); - - var passwordlabel = document.createElement('label'); // Create Label for Password Field - passwordlabel.innerHTML = "Password : "; - createform.appendChild(passwordlabel); - - var passwordelement = document.createElement('input'); // Create Input Field for Password. - passwordelement.setAttribute("type", "password"); - passwordelement.setAttribute("name", "password"); - passwordelement.setAttribute("id", "password"); - passwordelement.setAttribute("required","required"); - createform.appendChild(passwordelement); - - - var passwordbreak = document.createElement('br'); - createform.appendChild(passwordbreak); - - - var submitelement = document.createElement('button'); // Append Submit Button - submitelement.setAttribute("type", "button"); - submitelement.setAttribute("onclick", "ROC_AUTH.login();"); - submitelement.innerHTML = "Sign In "; - createform.appendChild(submitelement); - -}; - - -var password = document.getElementById("password") - , confirm_password = document.getElementById("confirm_password"); - -ROC_AUTH.validatePassword =function(){ - if(password.value != confirm_password.value) { - confirm_password.setCustomValidity("Passwords Don't Match"); - } else { - confirm_password.setCustomValidity(''); - } -} - -password.onchange = ROC_AUTH.validatePassword(); -confirm_password.onkeyup = ROC_AUTH.validatePassword; \ No newline at end of file diff --git a/modules/auth/site/files/js/roc_auth.js b/modules/basic_auth/site/files/js/roc_basic_auth.js similarity index 100% rename from modules/auth/site/files/js/roc_auth.js rename to modules/basic_auth/site/files/js/roc_basic_auth.js