Spring security & Jwt tutorial update
ฝัง
- เผยแพร่เมื่อ 8 ต.ค. 2024
- This is a simple follow up video to the main spring security video tutorial posted a couple of days ago
• Complete Spring Securi...
In this follow up video I've only made changes to the JwtService class and the pom.xml file by updating the version of my jjwt-api library to the latest version of 0.12.5 and also removing deprecated function that was initially used from the jwtservice class. check out the main video using the link above and get the link to the github repository of the updated source code.
man thx a lot you saved my day! documentation of that jjwt is so difficult
Glad it helped!
Love your consistency bro ❤
Thank you
Hi,
i have exactly done what you did and after testing an endpoint in postman with the jwt token, i get the below error , what is wrong with this?
io.jsonwebtoken.security.SignatureException: JWT signature does not match locally computed signature. JWT validity cannot be asserted and should not be trusted.
at io.jsonwebtoken.impl.DefaultJwtParser.verifySignature(DefaultJwtParser.java:340) ~[jjwt-impl-0.12.5.jar:0.12.5]
From the error statement I think you didn't copy the correct jwt token so just try this time around to properly highlight the token and ensure that you're not adding or removing any character from the it.
then let me know the result you got.
@@IOCodesi had copied the token correctly...it seems that this one request i am testing has some issues, because other req calls work fine with this token...so the problem lies within my own code (controller) which i need to fix ...thank you very much for your quick response 👍 keep up the good work 👌