gst-rtsp-server authenticated user info

Hello:

I am using gst-rtsp-server (1.16.1) to host a video stream. It is accessed using basic authentication and works fine. I am now trying to get access the user’s role to make some processing decisions later in the code. I setup a client-connected callback to get access to the RTSPClient which I believe contains this information, but I do not see any methods that support accessing the RTSPToken object. Is there a way to access this information?

Thanks,
Greg

I was able to access the role with this combination:

class GstServer():
  def init(self):
    self.server = GstRtspServer.RTSPServer()

    ...

    self.server.connect('client-connected', self.on_client_connected, None)
    self.server.attach(None)

  def on_client_connected(self, server: GstRtspServer.RTSPServer, client: GstRtspServer.RTSPClient, x):
    client.connect("describe-request", self.on_describe_request)

  def on_describe_request(self, client, context):
    token = context.token
    role = token.get_string("media.factory.role")