Skip to content

Commit

Permalink
chore: added base auth types
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Dec 27, 2023
1 parent 6740de2 commit f87d2d8
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/netius/auth/base.pyi
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
from typing import Any, Literal, NoReturn, PathLike, Unbound
from typing import Any, Literal, NoReturn, PathLike

HashType = Literal["plain", "md5", "sha1", "sha256", "sha512"]

class Auth:
def __init__(self, *args, **kwargs) -> None: ...
@classmethod
def auth(cls, *args, **kwargs) -> NoReturn: ...
def auth(cls, *args, **kwargs) -> bool: ...
@classmethod
def meta(cls, *args, **kwargs) -> dict: ...
def meta(cls, *args, **kwargs) -> dict[str, Any]: ...
@classmethod
def auth_assert(cls, *args, **kwargs) -> None: ...
def auth_assert(cls, *args, **kwargs) -> NoReturn: ...
@classmethod
def verify(cls, encoded: str, decoded: str) -> bool: ...
@classmethod
def generate(cls, password: str, type: HashType = ..., salt: str = ...) -> str: ...
@classmethod
def unpack(cls, password) -> tuple[Any | Literal["plain"], bytes | Any | str | None, Any | None, Unbound | Any | None]: ...
def unpack(cls, password) -> tuple[HashType, str | None, str, str | None]: ...
@classmethod
def get_file(cls, path: PathLike[str], cache: bool = ..., encoding: str | None = ...) -> (Any | str | bytes): ...
def get_file(cls, path: PathLike[str], cache: bool = ..., encoding: str | None = ...) -> str | bytes: ...
@classmethod
def is_simple(cls) -> bool: ...
def auth_i(self, *args, **kwargs) -> NoReturn: ...
def auth_assert_i(self, *args, **kwargs) -> None: ...
def is_simple_i(self) -> Literal[False]: ...
def auth_i(self, *args, **kwargs) -> bool: ...
def auth_assert_i(self, *args, **kwargs) -> NoReturn: ...
def is_simple_i(self) -> bool: ...

0 comments on commit f87d2d8

Please sign in to comment.