[keycloak-user] How to mock LDAP user login with expired password

Marek Posolda mposolda at redhat.com
Mon Apr 10 15:53:52 EDT 2017


We have some tests, which directly add users to LDAP and then they use 
those users for test something with Keycloak integration.

For inspiration, you can take a look at our existing tests in package 
"org.keycloak.testsuite.federation.storage.ldap". For example 
LDAPProvidersIntegrationTest.

Marek

On 06/04/17 16:17, Adrian Madaras wrote:
> Hi everyone,
> I know that showing a message if the user's password is expired is a security breach but I need this for my development purposes. I've manage to implement this in the LDAPStorageProvider.java using Thread.local and then sending the appropriate message to the front end in the AbstractUsernameFormAuthenticator.java class.
> Everything is fine and dandy but I want to write an integration test to check if everything works as it should. The problem is I don't know how to mock a LDAP user that has an expired password. I've search google but no answer.
> Can someone help me?
> Thanks,
> Adrian
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user




More information about the keycloak-user mailing list