arena-py API v1.0.1
arena .auth
auth.py - Authentication methods for accessing the ARENA.
class
ArenaAuth:
def
authenticate_scene(self, web_host, realm, scene, username, video=False):
End authentication flow, requesting permissions may change by owner or admin, for now, get a fresh mqtt_token each time.
Parameters
- str web_host: The hostname of the ARENA webserver.
- str realm: The topic realm name.
- str scene: The namespace/scene name combination.
- str username: The ARENA username for the user.
- bool video: If Jitsi video conference is requested.
Returns
username and mqtt_token from arena-account.
def
authenticate_device(self, web_host):
Check for device mqtt_token, ask for a missing one, and save to local memory.
def
has_publish_rights(self, token, topic):
Check the MQTT token for permission to publish to topic.
def
store_environment_auth(self, username, token):
Keep a copy of the token in local memory for urlopen and other tasks.
def
signout():
def
permissions():