The rapidly evolving technology era demands a secure and efficient authentication mechanism when exchanging information between users and servers. One of the most common authentication methods used in REST APIs is JSON Web Token (JWT) due to its stateless and lightweight nature. However, the implementation of static JWT still has a weakness because pre-existing tokens can be used in other contexts such as other devices or other IP addresses. This can result in token misuse, resulting in data leakage. This study was conducted by comparing the performance and security aspects of static JWT and dynamic JWT in REST APIs using the PHP Laravel framework. Testing results show that the implementation of static and dynamic JWT does not have a significant difference in performance. However, dynamic JWT excels in security aspects because it is able to detect unauthorized access attempts due to context mismatch.
Copyrights © 2026