Skip to content

Commit

Permalink
Add alogin, aauthenticate and update request type (#244)
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick91 authored May 21, 2024
1 parent bc715bb commit 06adcdb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion django-stubs/contrib/auth/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,19 @@ REDIRECT_FIELD_NAME: str

def load_backend(path: str) -> ModelBackend: ...
def get_backends() -> list[ModelBackend]: ...
def authenticate(request: Any = ..., **credentials: Any) -> AbstractBaseUser | None: ...
def authenticate(request: HttpRequest = ..., **credentials: Any) -> AbstractBaseUser | None: ...
def login(
request: HttpRequest,
user: AbstractBaseUser | None,
backend: type[ModelBackend] | str | None = ...,
) -> None: ...
def logout(request: HttpRequest) -> None: ...
async def aauthenticate(request: HttpRequest = ..., **credentials: Any) -> AbstractBaseUser | None: ...
async def alogin(
request: HttpRequest,
user: AbstractBaseUser | None,
backend: type[ModelBackend] | str | None = ...,
) -> None: ...
def get_user_model() -> type[AbstractBaseUser]: ...
def get_user(request: HttpRequest | Client) -> AbstractBaseUser | AnonymousUser: ...
def get_permission_codename(action: str, opts: Options[Any]) -> str: ...
Expand Down

0 comments on commit 06adcdb

Please sign in to comment.