• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

best way to store user info

 
Yahya Elyasse
Ranch Hand
Posts: 510
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I have a java standalone application in witch user is required to login .
my application needs to store user username & password , so if user run application later he is automatically authenticated with his previous stored username & password.

I stored user infos using java serialization : used a class User which i serialize to a file & save it to user hard disk. this class is each time deserialized to try authenticating user automatically.
I don't believe this serialization solution is elegant . because the serialized file could be changed or deleted by user. it is also difficult to make it a hidden file because i want my app to be cross-platform and hiding files is different across different platforms.
so i'm looking for a better & elegant way to store user login infos .
using database is not appropriate in my case.and i want these private data to be hidden andnot accessible to malicious users.
Any good ideas how to do that ?
thanks.
 
Stevi Deter
Ranch Hand
Posts: 265
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are countless existing security frameworks out there. Start with the links in the Java Ranch Security FAQ. You might want to look at something like JAAS as a solution.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic