fix authentication

This commit is contained in:
dirgantarasiahaan
2023-05-25 14:54:43 +07:00
parent d50b2a8eef
commit c833f09200
8 changed files with 17 additions and 16 deletions

View File

@@ -14,9 +14,9 @@ public interface TokenManagementRepository extends JpaRepository<TokenManagement
@Query(value = "SELECT access_token as accessToken FROM token_management " +
"WHERE user_id = :userId " +
"AND isDelete = false " +
"AND expired_time >= SYSDATE", nativeQuery = true)
List<TokenManagementView> findAccessTokenByUserIdAndDeletedFalse(String userId);
"AND is_delete = 0 " +
"AND expired_time >= CURRENT_TIMESTAMP", nativeQuery = true)
List<TokenManagementView> findAccessTokenByUserIdAndDeletedFalse(Long userId);
@Query(value = "SELECT tm from TokenManagement tm " +
"WHERE tm.refreshToken = :refreshToken " +