flask-jwt
flask-jwt copied to clipboard
Why have JWT methods been prefixed with "jwt_"?
As a part of 0.3 branch and migration to PyJWT a number of JWT methods got renamed, prefixed with 'jwt_' and others have not:
| 0.2 | 0.3 |
|---|---|
| authentication_handler | authentication_handler |
| identity_handler | identity_handler |
| error_handler | **jwt_**error_handler |
| request_handler | request_handler |
| encode_handler | **jwt_**encode_handler |
| decode_handler | **jwt_**decode_handler |
| payload_handler | **jwt_**payload_handler |
| headers_handler | **jwt_**headers_handler |
Did I miss some?
I don't quite understand, why some got prefixed and others didn't (there isn't any collision with "import jwt" functions as far as I can tell). Migrating from 0.2 is somewhat a headache experience because of the missing link. That and the fact that method docs still refer to old names like "jwt.payload_handler".
Thanks.
+1.. I was trying to figure out why I kept getting AttributeError: 'JWT' object has no attribute 'payload_handler'
+1 for removing the jwt_ prefix, I got the same problem.
+1 same as @raptoria . I am glad I found this ticket.
I don't know why the methods were renamed but. We need to approve mr #87 or update documentation :)
It seems that the author has abandon this repo.