By Anya SharmaMastering Java Authentication: A Comprehensive Guide from JAAS to Spring Security and JWT