'Fetch a new Plex.tv token for PlexPy'

@cherrypy.expose
@cherrypy.tools.json_out()
@requireAuth(member_of('admin'))
def get_plexpy_pms_token(self, username=None, password=None, force=False, **kwargs):

    if ((not username) and (not password)):
        return None
    force = (True if (force == 'true') else False)
    plex_tv = plextv.PlexTV(username=username, password=password)
    token = plex_tv.get_plexpy_pms_token(force=force)
    if token:
        return {'result': 'success', 'message': 'Authentication    successful.', 'token': token}
    else:
        return {'result': 'error', 'message': 'Authentication    failed.'}
