mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-16 02:02:58 -07:00
Implement JWT instead of using cherrypy sessions
This commit is contained in:
parent
7c4c7bfc90
commit
a3e6e76158
7 changed files with 182 additions and 79 deletions
|
@ -23,16 +23,15 @@ def get_session_info():
|
|||
"""
|
||||
Returns the session info for the user session
|
||||
"""
|
||||
from plexpy.webauth import SESSION_KEY
|
||||
|
||||
_session = {'user_id': None,
|
||||
'user': None,
|
||||
'user_group': 'admin',
|
||||
'expiry': None}
|
||||
try:
|
||||
return cherrypy.session.get(SESSION_KEY, _session)
|
||||
except AttributeError as e:
|
||||
return _session
|
||||
'exp': None}
|
||||
|
||||
if isinstance(cherrypy.request.login, dict):
|
||||
return cherrypy.request.login
|
||||
|
||||
return _session
|
||||
|
||||
def get_session_user():
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue