flask-jwt icon indicating copy to clipboard operation
flask-jwt copied to clipboard

Why have JWT methods been prefixed with "jwt_"?

Open arteme opened this issue 9 years ago • 5 comments

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.

arteme avatar Nov 19 '15 10:11 arteme

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

raptoria avatar Dec 07 '15 20:12 raptoria

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

hoatle avatar Jan 15 '16 03:01 hoatle

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

jakubczaplicki avatar Mar 08 '16 15:03 jakubczaplicki

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

felipear89 avatar Aug 27 '16 20:08 felipear89

It seems that the author has abandon this repo.

aguegu avatar Jan 09 '17 03:01 aguegu