• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

best way to store user info

 
Ranch Hand
Posts: 510
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 265
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
On my planet I'm considered quite beautiful. Thanks to the poetry in this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic