Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
theomonnom committed Nov 14, 2023
1 parent e927b87 commit 2afe37b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions livekit-api/livekit/api/access_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ def verify(self, token: str) -> Claims:
return c


def camel_to_snake(str):
return re.sub(r"(?<!^)(?=[A-Z])", "_", str).lower()
def camel_to_snake(t: str):
return re.sub(r"(?<!^)(?=[A-Z])", "_", t).lower()


def snake_to_camel(str):
return "".join(word.title() for word in name.split("_"))
def snake_to_camel(t: str):
return "".join(x.title() for x in t.split("_"))
6 changes: 3 additions & 3 deletions livekit-api/livekit/api/webhook.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@


class WebhookReceiver:
def __init__(token_verifier: TokenVerifier):
self.token_verifier = token_verifier
def __init__(self, token_verifier: TokenVerifier):
self._verifier = token_verifier

def receive(self, body: str, auth_token: str):
claims = self.token_verifier.verify(auth_token)
claims = self._verifier.verify(auth_token)

body_hash = hashlib.sha256(body).digest()
claims_hash = base64.b64decode(claims.sha256)
Expand Down

0 comments on commit 2afe37b

Please sign in to comment.