Token expiration fixed
This commit is contained in:
parent
62bbf148b2
commit
1b126c7792
@ -0,0 +1,13 @@
|
||||
package com.plannaplan.exceptions;
|
||||
|
||||
public class TokenExpiredException extends RuntimeException {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public TokenExpiredException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
}
|
@ -70,7 +70,11 @@ public class AuthenticationProvider extends AbstractUserDetailsAuthenticationPro
|
||||
|
||||
@Override
|
||||
public boolean isCredentialsNonExpired() {
|
||||
return user.isCredentialsNonExpired();
|
||||
if (user.isCredentialsNonExpired()) {
|
||||
userService.save(user);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user