Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to force user to Change Password when first time login using Java ?

 
Hozaifa Azmi
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all...

let me know how to force user to Change Password when first time login using Java ?

Thank you in advance,
H.N.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How are you planning to do it? Whats your understanding? We might be able to help you. Moreover, why it is related to JSF? Give us some hints, we would try to provide you some good suggestions.
 
Hozaifa Azmi
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi...

yes, you are right, I am woking with JSF.

I will add a new column "password_status" in the database;
this attribute will be set to true by default;
On logging, i will also check for this attribute besides userid & password;

I will write one method in managed bean which will test for both userid,password & password_status;
based on the method outcome, proper page will be displayed.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That sounds great. The only thing I would like to suggest is a proper name. May be PASSWORD_CHANGED=0, or DEFAULT_PASSWORD=1, in either case the user must be forced to change the password.

Where 0 = false, and 1 = true.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic