fix forgot password

This commit is contained in:
dirgantarasiahaan
2023-05-28 18:08:10 +07:00
parent a32d5a499f
commit 9f1a9b9004
4 changed files with 85 additions and 10 deletions

View File

@ -55,7 +55,8 @@ public class JwtRequestFilter extends OncePerRequestFilter {
private void isValidToken(HttpServletRequest request, String jwtToken) {
String requestUrl = request.getRequestURI();
String refreshTokenUrl = "/api/authentication/refresh-token";
if (!refreshTokenUrl.equals(requestUrl)) {
String forgotPasswordUrl = "/api/authentication/forgot-password";
if (!org.apache.commons.lang3.StringUtils.equalsAnyIgnoreCase(requestUrl, refreshTokenUrl, forgotPasswordUrl)) {
var isValid = isValidAuthenticateToken(jwtToken);
if (!isValid) {
throw new BusinessException(HttpStatus.UNAUTHORIZED, "Invalid Access Token");