pallets-eco / flask-jwt

JWT (JSON Web Tokens) for Flask applications
MIT License
564 stars 177 forks source link

Why have JWT methods been prefixed with "jwt_"? #65

Open arteme opened 8 years ago

arteme commented 8 years ago

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.

raptoria commented 8 years ago

+1.. I was trying to figure out why I kept getting AttributeError: 'JWT' object has no attribute 'payload_handler'

hoatle commented 8 years ago

+1 for removing the jwt_ prefix, I got the same problem.

jakubczaplicki commented 8 years ago

+1 same as @raptoria . I am glad I found this ticket.

felipear89 commented 8 years ago

I don't know why the methods were renamed but. We need to approve mr #87 or update documentation :)

aguegu commented 7 years ago

It seems that the author has abandon this repo.