Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java program protection.

 
xD xD
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to protect a calculator so that it only can be used when logged in on a website. Can someone explain me how I could do this?

mail to schaek.p@gmail.com please I'm desperate
 
Keith Lynn
Ranch Hand
Posts: 2399
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it an applet?
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello "xD xD"-

Welcome to JavaRanch.

On your way in you may have missed that JavaRanch has a policy on display names, and yours does not comply with it - please adjust it accordingly, which you can do right here. Thanks for your prompt attention to this matter.

We also ask that people don't post their email address; we like to keep conversations in the forums, so that everybody can benefit from the answers. Please edit your post to remove it.

Enjoy your time here.
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As to your question, the answer would seem to be authentication. If this is part of a web app, then you can add basic or form authentication to protect the page. The Tomcat FAQ page has some pointers on how to set up web app security.
 
ak pillai
author
Ranch Hand
Posts: 288
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have a login page. Every time before you display your calculator page, check your HttpSession object to make sure that the user has logged in. when the user logout of your site, invalidate your session. You can store the usernames and passwords in DataBase, LDAP server or flat files.


google for form-based authentication.

Authentication methods:

-- Basic/Digest authentication: Browser specific and password is encoded using Base-64 encoding. Digest is similar to basic but protects the password through encryption. This is a simple challenge-response scheme where the client is challenged for a user id and password. The Internet is divided into realms.

-- Form-based authentication: Most Web applications use the form-based authentication since it allows applications to customise the authentication interface. Uses base64 encoding which can expose username and password unless all connections are over SSL. (Since this is the most common let us look at in greater detail together ie authentication & authorisation under Authorisation).

-- Certificate based authentication: Uses PKI and SSL. This is by far the most secured authentication method.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic