@Test public void shouldCheckUserPasswordExpiredStatus(){ when(ldapUserDetails.getAttributes()).thenReturn(new BasicAttributes()); final Boolean nonExpiredPassword = sut.checkExpiredPassword(ldapUserDetails.getAttributes()); assertThat(nonExpiredPassword, is(false)); Attribute pwdGraceUseTime = new BasicAttribute("pwdGraceUseTime"); Attributes attributes = new BasicAttributes(); attributes.put(pwdGraceUseTime); when(ldapUserDetails.getAttributes()).thenReturn(attributes); final Boolean expiredPassword = sut.checkExpiredPassword(ldapUserDetails.getAttributes()); assertThat(expiredPassword, 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);  }