Skip to content

Commit

Permalink
feat(python): fixed typing
Browse files Browse the repository at this point in the history
  • Loading branch information
v.kozyar committed Feb 22, 2024
1 parent 893f98d commit 8a2fb02
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions flipt-python/flipt/authentication/__init__.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
class AuthenticationStrategy:
def authenticate(self, headers: dict):
def authenticate(self, headers: dict[str, str]) -> None:
raise NotImplementedError()


class ClientTokenAuthentication(AuthenticationStrategy):
def __init__(self, token: str):
def __init__(self, token: str) -> None:
self.token = token

def authenticate(self, headers: dict):
def authenticate(self, headers: dict[str, str]) -> None:
headers["Authorization"] = f"Bearer {self.token}"


class JWTAuthentication(AuthenticationStrategy):
def __init__(self, token: str):
def __init__(self, token: str) -> None:
self.token = token

def authenticate(self, headers: dict):
def authenticate(self, headers: dict[str, str]) -> None:
headers["Authorization"] = f"JWT {self.token}"

0 comments on commit 8a2fb02

Please sign in to comment.