Token expiration fixed

This commit is contained in:
BuildTools 2020-11-08 17:06:08 +01:00
parent 62bbf148b2
commit 1b126c7792
2 changed files with 18 additions and 1 deletions

View File

@ -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);
}
}

View File

@ -70,7 +70,11 @@ public class AuthenticationProvider extends AbstractUserDetailsAuthenticationPro
@Override @Override
public boolean isCredentialsNonExpired() { public boolean isCredentialsNonExpired() {
return user.isCredentialsNonExpired(); if (user.isCredentialsNonExpired()) {
userService.save(user);
return true;
}
return false;
} }
@Override @Override