@@ -271,7 +271,7 @@ def identify(payload):
271271 self .identity_callback = callback
272272 return callback
273273
274- def jwt_error_handler (self , callback ):
274+ def error_handler (self , callback ):
275275 """Specifies the error handler function. Example::
276276
277277 @jwt.error_handler
@@ -314,15 +314,15 @@ def request_handler(self, callback):
314314 self .request_callback = callback
315315 return callback
316316
317- def jwt_encode_handler (self , callback ):
317+ def encode_handler (self , callback ):
318318 """Specifies the encoding handler function. This function receives a payload and signs it.
319319
320320 :param callable callback: the encoding handler function
321321 """
322322 self .jwt_encode_callback = callback
323323 return callback
324324
325- def jwt_decode_handler (self , callback ):
325+ def decode_handler (self , callback ):
326326 """Specifies the decoding handler function. This function receives a
327327 signed payload and decodes it.
328328
@@ -331,7 +331,7 @@ def jwt_decode_handler(self, callback):
331331 self .jwt_decode_callback = callback
332332 return callback
333333
334- def jwt_payload_handler (self , callback ):
334+ def payload_handler (self , callback ):
335335 """Specifies the JWT payload handler function. This function receives the return value from
336336 the ``identity_handler`` function
337337
@@ -346,17 +346,17 @@ def make_payload(identity):
346346 self .jwt_payload_callback = callback
347347 return callback
348348
349- def jwt_headers_handler (self , callback ):
349+ def headers_handler (self , callback ):
350350 """Specifies the JWT header handler function. This function receives the return value from
351351 the ``identity_handler`` function.
352352
353353 Example::
354354
355- @jwt.payload_handler
356- def make_payload (identity):
355+ @jwt.headers_handler
356+ def make_headers (identity):
357357 return {'user_id': identity.id}
358358
359- :param callable callback: the payload handler function
359+ :param callable callback: the header handler function
360360 """
361361 self .jwt_headers_callback = callback
362362 return callback
0 commit comments