Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

when used as decorators, return callback

Otherwise, using them as decorators will make the callback
unusable in other contexts
  • Loading branch information...
commit 29b2574f861f6a26e66cd0a7b4eb16907b01316a 1 parent 98370e0
@mihneasim mihneasim authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 flask_login.py
View
4 flask_login.py
@@ -201,6 +201,7 @@ def user_loader(self, callback):
:param callback: The callback for retrieving a user object.
"""
self.user_callback = callback
+ return callback
def token_loader(self, callback):
"""
@@ -212,6 +213,7 @@ def token_loader(self, callback):
:param callback: The callback for retrieving a user object.
"""
self.token_callback = callback
+ return callback
def setup_app(self, app, add_context_processor=True):
"""
@@ -249,6 +251,7 @@ def unauthorized_handler(self, callback):
:param callback: The callback for unauthorized users.
"""
self.unauthorized_callback = callback
+ return callback
def unauthorized(self):
"""
@@ -286,6 +289,7 @@ def needs_refresh_handler(self, callback):
:param callback: The callback for unauthorized users.
"""
self.needs_refresh_callback = callback
+ return callback
def needs_refresh(self):
"""
Please sign in to comment.
Something went wrong with that request. Please try again.