Add support for client-side session timeout warning
This commit is contained in:
parent
4ae70de339
commit
e3ec3be03b
4 changed files with 81 additions and 18 deletions
|
@ -149,6 +149,12 @@ class AuthenticationView(View):
|
|||
def mobile_logout(self):
|
||||
return self.logout(mobile=True)
|
||||
|
||||
def noop(self):
|
||||
"""
|
||||
View to serve as "no-op" / ping action to reset current user's session timer
|
||||
"""
|
||||
return {'status': 'ok'}
|
||||
|
||||
def change_password(self):
|
||||
"""
|
||||
Allows a user to change his or her password.
|
||||
|
@ -201,6 +207,10 @@ class AuthenticationView(View):
|
|||
config.add_route('mobile.logout', '/mobile/logout')
|
||||
config.add_view(cls, attr='mobile_logout', route_name='mobile.logout')
|
||||
|
||||
# no-op
|
||||
config.add_route('noop', '/noop')
|
||||
config.add_view(cls, attr='noop', route_name='noop', renderer='json')
|
||||
|
||||
# change password
|
||||
config.add_route('change_password', '/change-password')
|
||||
config.add_view(cls, attr='change_password', route_name='change_password', renderer='/change_password.mako')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue