Request for ValidationError Support in Version 5
LieLieLiekey opened this issue · comments
Hello golang-jwt maintainers,
I am currently using your open-source golang-jwt library and it has been a great help in my projects. However, I have noticed that the latest version, v5, does not support ValidationError. This has been inconvenient for the callers to identify the errors or handle error codes.
Considering the practical utility that this feature offers, I would like to propose the addition of ValidationError support to this version. I believe this would greatly improve the error handling capabilities of your library and would be beneficial to many developers.
I see that this has been discussed in a previous issue: #125. I kindly urge you to reconsider the implementation of this feature for the betterment of this library.
Thank you for your time and for considering this request. I appreciate your efforts in maintaining this library.
Best regards
version v5 used the joinedError type
Alternatively, is there any way to identify whether a certain error, such as ErrTokenExpired, is included within the joinedError?
You should be able to use errors.Is
with the specific error that you want. This should work independently whether a joined error or the old validation error is used. See the following example:
Lines 158 to 181 in 33d62b4
oh, i got it, thanks very much!