February 13, 2017 at 10:21 am #15772
We use openAM as the authentication page and openAM internally authenticates a user (based on user name and password) using openDJ. If a user exceeds the limit of maximum permissible login attempts (6 in our case) the account locked status of that particular user is set to true in openDJ and once he is locked and he won’t be able to login. so we have a requirement here, we also maintain the list of users in the database (oracle or mongoDB) and whenever a user is locked due to invalid password attempts we need to update the same locked status in our database. As openAM login is something which is outside of our application code how can we achieve that?
Writing custom codes
We would like you to suggest a solution to this problem.
Sai.February 13, 2017 at 10:28 am #15773cheechongParticipant
If I am not wrong, onLoginFailure is where OpenAM will redirect you to when account is locked. I could be wrong, test it out.February 15, 2017 at 10:08 am #15803
I followed the exact same process and I wrote a log message in all the three functions. I have no idea about what’s going wrong but there is no log recorded in tomcat even after copying the jar file to openAM lib folder and restarting the tomcat.
PS: I have also configured it in myrealm from openAM admin console.
February 16, 2017 at 7:11 am #15822
- This reply was modified 5 years, 4 months ago by bikumar.
I was able to deploy a post authentication plugin in openAM. I see that the control comes to onLoginFailure in both the invalid password scenario and user account lockout scenario. So how can I differentiate between the two cases in my custom code. Like is there any attribute or something in the response which says what action to be performed (i.e. whether to show invalid password page or account locked state). What I am trying to do here is know the state of the user account and make a database call to mondoDB in onLoginFailure function and update the user status in mongoDB when we detect a lockout case.
You must be logged in to reply to this topic.