Proxy token check through server

This commit is contained in:
JonnyWong16 2022-01-05 11:17:35 -08:00
parent c39f89356c
commit d943877e76
No known key found for this signature in database
GPG key ID: 7A649674469E6574
3 changed files with 12 additions and 6 deletions

View file

@ -3414,6 +3414,15 @@ class WebInterface(object):
return {'result': 'success', 'message': 'Settings saved.'}
@cherrypy.expose
@cherrypy.tools.json_out()
@requireAuth(member_of("admin"))
def check_pms_token(self, **kwargs):
plex_tv = plextv.PlexTV()
response = plex_tv.get_plextv_resources(return_response=True)
if not response.ok:
cherrypy.response.status = 401
@cherrypy.expose
@cherrypy.tools.json_out()
@requireAuth(member_of("admin"))