@Test public void shouldSetExpiredPasswordWhenPwdGraceUseTimeIsActive(){ Attribute pwdGraceUseTime = new BasicAttribute("pwdGraceUseTime"); Attributes attributes = new BasicAttributes(); attributes.put(pwdGraceUseTime); when(ldapUserDetails.getAttributes()).thenReturn(attributes); User userForTest = getUserForTest(); Boolean passExpired = sut.checkExpiredPassword(ldapUserDetails.getAttributes()); userForTest.setPasswordExpired(passExpired); assertThat(passExpired ,is(true)); }
protected Boolean checkExpiredPassword(Attributes attributes) { return attributes.get(LdapAttributes.PWD_GRACE_LOGIN) != null; }
LdapCustomAuthenticationProvider extends LdapAuthenticationProvider { protected Boolean checkExpiredPassword(Attributes attributes) { return attributes.get(LdapAttributes.PWD_GRACE_LOGIN) != null; } }
LdapCustomAuthenticationProvider extends LdapAuthenticationProvider { protected Boolean checkExpiredPassword(Attributes attributes) { return attributes.get(LdapAttributes.PWD_GRACE_LOGIN) != null; } LdapCustomAuthenticationProvider(LdapAuthenticator authenticator,
                                            LdapAuthoritiesPopulator authoritiesPopulator); }
LdapCustomAuthenticationProvider extends LdapAuthenticationProvider { protected Boolean checkExpiredPassword(Attributes attributes) { return attributes.get(LdapAttributes.PWD_GRACE_LOGIN) != null; } LdapCustomAuthenticationProvider(LdapAuthenticator authenticator,
                                            LdapAuthoritiesPopulator authoritiesPopulator); void setUserDetailsService(UserDetailsService userDetailsService); }
LdapCustomAuthenticationProvider extends LdapAuthenticationProvider { protected Boolean checkExpiredPassword(Attributes attributes) { return attributes.get(LdapAttributes.PWD_GRACE_LOGIN) != null; } LdapCustomAuthenticationProvider(LdapAuthenticator authenticator,
                                            LdapAuthoritiesPopulator authoritiesPopulator); void setUserDetailsService(UserDetailsService userDetailsService);  }