Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Cleaned up doc strings #72

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions flask_jwt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def identify(payload):
def jwt_error_handler(self, callback):
"""Specifies the error handler function. Example::

@jwt.error_handler
@jwt.jwt_error_handler
def error_handler(e):
return "Something bad happened", 400

Expand Down Expand Up @@ -337,7 +337,7 @@ def jwt_payload_handler(self, callback):

Example::

@jwt.payload_handler
@jwt.jwt_payload_handler
def make_payload(identity):
return {'user_id': identity.id}

Expand All @@ -352,11 +352,11 @@ def jwt_headers_handler(self, callback):

Example::

@jwt.payload_handler
def make_payload(identity):
@jwt.jwt_headers_handler
def make_header(identity):
return {'user_id': identity.id}

:param callable callback: the payload handler function
:param callable callback: the header handler function
"""
self.jwt_headers_callback = callback
return callback