|
@ -66,7 +66,7 @@ public class WlyyUserDetailsService extends JdbcDaoSupport implements UserDetail
|
|
|
if (users == null || users.size() == 0) {
|
|
|
throw new UsernameNotFoundException(username);
|
|
|
}
|
|
|
if (users.get(0).isLocked()) {
|
|
|
if (null != users.get(0).isLocked() && users.get(0).isLocked()) {
|
|
|
Date date = users.get(0).getLockedDate();
|
|
|
if (new Date().after(DateUtils.addMinutes(date, autoUnlockTime))) {
|
|
|
//解除锁定
|
|
@ -74,7 +74,9 @@ public class WlyyUserDetailsService extends JdbcDaoSupport implements UserDetail
|
|
|
users.get(0).setLocked(false);
|
|
|
}
|
|
|
}
|
|
|
return new SaltUser(username, users.get(0).getPassword(), users.get(0).getSalt(), users.get(0).isEnabled(), users.get(0).isLocked(), getGrantedAuthorities(username));
|
|
|
boolean isEnabled = null == users.get(0).isEnabled() ? false : users.get(0).isEnabled();
|
|
|
boolean isLocked = null == users.get(0).isLocked() ? false : users.get(0).isLocked();
|
|
|
return new SaltUser(username, users.get(0).getPassword(), users.get(0).getSalt(), isEnabled, isLocked, getGrantedAuthorities(username));
|
|
|
}
|
|
|
|
|
|
|