costapy/core/authentication.py

6 lines
136 B
Python
Raw Normal View History

2022-03-16 11:06:52 +07:00
import cherrypy
def token_check(redirect):
if cherrypy.session.get("token") == None:
raise cherrypy.HTTPRedirect(redirect)