File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 1818import datetime
1919import os
2020import jwt
21- from typing import Optional , List , Literal
21+ from typing import Optional , List , Literal , Any
2222from google .protobuf .json_format import MessageToDict , ParseDict
2323
2424from livekit .protocol .room import RoomConfiguration
@@ -214,7 +214,10 @@ def verify(self, token: str) -> Claims:
214214 algorithms = ["HS256" ],
215215 leeway = self ._leeway .total_seconds (),
216216 )
217+ return self .decode_claims (claims )
217218
219+ @staticmethod
220+ def decode_claims (claims : dict [str , Any ]) -> Claims :
218221 video_dict = claims .get ("video" , dict ())
219222 video_dict = {camel_to_snake (k ): v for k , v in video_dict .items ()}
220223 video_dict = {k : v for k , v in video_dict .items () if k in VideoGrants .__dataclass_fields__ }
You can’t perform that action at this time.
0 commit comments