Skip to content

Commit

Permalink
Update extention init typing to match docs and code
Browse files Browse the repository at this point in the history
  • Loading branch information
aenglander authored and pgjones committed May 18, 2024
1 parent f8d9680 commit 8c3bdc4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/quart_auth/extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from contextlib import asynccontextmanager
from enum import auto, Enum
from hashlib import sha512
from typing import Any, AsyncGenerator, cast, Dict, Optional, Union
from typing import Any, AsyncGenerator, cast, Dict, Literal, Optional, Union

from itsdangerous import BadSignature, SignatureExpired, URLSafeTimedSerializer
from quart import (
Expand Down Expand Up @@ -46,7 +46,7 @@ class Action(Enum):


class _AuthSerializer(URLSafeTimedSerializer):
def __init__(self, secret: Union[str, bytes], salt: str) -> None:
def __init__(self, secret: Union[str, bytes], salt: Union[str, bytes]) -> None:
super().__init__(secret, salt, signer_kwargs={"digest_method": sha512})


Expand Down Expand Up @@ -85,11 +85,11 @@ def __init__(
cookie_domain: Optional[str] = None,
cookie_name: Optional[str] = None,
cookie_path: Optional[str] = None,
cookie_http_only: Optional[str] = None,
cookie_samesite: Optional[str] = None,
cookie_secure: Optional[str] = None,
cookie_http_only: Optional[bool] = None,
cookie_samesite: Optional[Literal["Strict", "Lax"]] = None,
cookie_secure: Optional[bool] = None,
duration: Optional[int] = None,
mode: Optional[str] = None,
mode: Optional[Literal["cookie", "bearer"]] = None,
salt: Optional[str] = None,
singleton: bool = True,
) -> None:
Expand Down

0 comments on commit 8c3bdc4

Please sign in to comment.