DeskNow Knowledge Base
 
      

Custom login page
DeskNow version: 2.4 and later 

It is possible to customize the login page of DeskNow.

  • To simply change the logo that appears in the page, login as admin and see Administration/Branding
  • To completely change the page, edit the file /webapps/desknow/jsp/original/Login_default.jsp
    Pay close attention to preserve the javascript code and all the fields in the form.
  • To put the login box inside another page (ex your portal's home): include the following code:

<form method="post" action="/desknow/home.do?Action=Login">
<input type=text name="username"><br/>
<input type=password name="password"><br/>
<input type=hidden name="encryption" value="plain">
<input type=submit value="Login">
</form>

Password encryption, and login from a link

The previous method sends the password in cleartext. This could be a security risk. DeskNow supports three forms of password encryption. The most secure, and used by default, is MD5 hashing. Then there is 3DES with a server-generated key. This is less secure than MD5, but necessary in some cases when using an external authentication plugin. These two methods are not easily usable if you want to have a custom login page. The third available method is 3DES with client generated key.

See example below:

<html>
<body>
<script language="JavaScript" src="
http://www.server.com/desknow/3.0.11javascript/des.js"></script>
<script language="JavaScript">
function doDeskNowLogin(username,password) {
  var ltoken="09DFGTREJKLOPAFDGH98KJWE"; // can be any random string 24 characters long. It can be dynamically generated
  var ep=desknowEncrypt(ltoken,password);
  var lurl="
http://www.server.com/desknow/home.do?Action=Login&LoginToken="+escape(ltoken)+"&encryption=u3des&hp="+ep+"&username="+escape(username);
 
  // note: you can easily change the code to return the URL for future use, instead of launching it immediately.
  // return lurl;


  window.location=lurl;
}
</script>
<form>
<input type=text name="username"><br/>
<input type=password name="password"><br/>
<input type=button value="Login" onClick="doDeskNowLogin(this.form.username.value,this.form.password.value);">
</form>
</body>
</html>

You need to change www.server.com with the correct URL for your DeskNow server (in 2 locations in the code). Also make sure to use the appropriate version number of DeskNow (3.0.11 in this case). To avoid having to change this every time yuou upgrade DeskNow, consider copying the des.js file to a fixed location.

Note that it is also possible to have a single link that logs the user into DeskNow, without having to input data in a form appositely. This is especially useful when integrating DeskNow into a portal, where the user has already logged in. To do so, simply alter the doDeskNowLogin() javascript function to return the appropriate URL instead of launching it (see comment in the code).

 

Email Article Email
Print Article Print


How helpful was this article to you?
Related Articles
article How can I have the login page at a different URL than index.html?
Just edit the file...

  April 11, 2005    Views: 50380   
article Custom authentication
This article describes how to use a custom...

  May 2, 2004    Views: 60660   
article Ho do I redirect users to a particular web page on logout?
  When the user clicks on the Logout...

  June 29, 2005    Views: 35138   



Powered by Lore :: (c)2003 Pineapple Technologies.