-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'mypy_web' into develop
- Loading branch information
Showing
43 changed files
with
676 additions
and
352 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from _typeshed import Incomplete | ||
|
||
__description__: str | ||
__url__: str | ||
__version_info__: Incomplete | ||
__author_email__: str | ||
__maintainer__: str |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from .config import AUTH_HEADER_NAME as AUTH_HEADER_NAME, COOKIE_DURATION as COOKIE_DURATION, COOKIE_HTTPONLY as COOKIE_HTTPONLY, COOKIE_NAME as COOKIE_NAME, COOKIE_SECURE as COOKIE_SECURE, ID_ATTRIBUTE as ID_ATTRIBUTE, LOGIN_MESSAGE as LOGIN_MESSAGE, LOGIN_MESSAGE_CATEGORY as LOGIN_MESSAGE_CATEGORY, REFRESH_MESSAGE as REFRESH_MESSAGE, REFRESH_MESSAGE_CATEGORY as REFRESH_MESSAGE_CATEGORY | ||
from .login_manager import LoginManager as LoginManager | ||
from .mixins import AnonymousUserMixin as AnonymousUserMixin, UserMixin as UserMixin | ||
from .signals import session_protected as session_protected, user_accessed as user_accessed, user_loaded_from_cookie as user_loaded_from_cookie, user_loaded_from_request as user_loaded_from_request, user_logged_in as user_logged_in, user_logged_out as user_logged_out, user_login_confirmed as user_login_confirmed, user_needs_refresh as user_needs_refresh, user_unauthorized as user_unauthorized | ||
from .utils import confirm_login as confirm_login, current_user as current_user, decode_cookie as decode_cookie, encode_cookie as encode_cookie, fresh_login_required as fresh_login_required, login_fresh as login_fresh, login_remembered as login_remembered, login_required as login_required, login_url as login_url, login_user as login_user, logout_user as logout_user, make_next_param as make_next_param, set_login_view as set_login_view |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from _typeshed import Incomplete | ||
|
||
COOKIE_NAME: str | ||
COOKIE_DURATION: Incomplete | ||
COOKIE_SECURE: bool | ||
COOKIE_HTTPONLY: bool | ||
COOKIE_SAMESITE: Incomplete | ||
LOGIN_MESSAGE: str | ||
LOGIN_MESSAGE_CATEGORY: str | ||
REFRESH_MESSAGE: str | ||
REFRESH_MESSAGE_CATEGORY: str | ||
ID_ATTRIBUTE: str | ||
AUTH_HEADER_NAME: str | ||
SESSION_KEYS: Incomplete | ||
EXEMPT_METHODS: Incomplete | ||
USE_SESSION_FOR_NEXT: bool |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import typing as t | ||
from .config import AUTH_HEADER_NAME as AUTH_HEADER_NAME, COOKIE_DURATION as COOKIE_DURATION, COOKIE_HTTPONLY as COOKIE_HTTPONLY, COOKIE_NAME as COOKIE_NAME, COOKIE_SAMESITE as COOKIE_SAMESITE, COOKIE_SECURE as COOKIE_SECURE, ID_ATTRIBUTE as ID_ATTRIBUTE, LOGIN_MESSAGE as LOGIN_MESSAGE, LOGIN_MESSAGE_CATEGORY as LOGIN_MESSAGE_CATEGORY, REFRESH_MESSAGE as REFRESH_MESSAGE, REFRESH_MESSAGE_CATEGORY as REFRESH_MESSAGE_CATEGORY, SESSION_KEYS as SESSION_KEYS, USE_SESSION_FOR_NEXT as USE_SESSION_FOR_NEXT | ||
from .mixins import AnonymousUserMixin as AnonymousUserMixin | ||
from .signals import session_protected as session_protected, user_accessed as user_accessed, user_loaded_from_cookie as user_loaded_from_cookie, user_loaded_from_request as user_loaded_from_request, user_needs_refresh as user_needs_refresh, user_unauthorized as user_unauthorized | ||
from .utils import decode_cookie as decode_cookie, encode_cookie as encode_cookie, expand_login_view as expand_login_view, make_next_param as make_next_param | ||
from _typeshed import Incomplete | ||
|
||
class LoginManager: | ||
anonymous_user: Incomplete | ||
login_view: Incomplete | ||
blueprint_login_views: Incomplete | ||
login_message: Incomplete | ||
login_message_category: Incomplete | ||
refresh_view: Incomplete | ||
needs_refresh_message: Incomplete | ||
needs_refresh_message_category: Incomplete | ||
session_protection: str | ||
localize_callback: Incomplete | ||
unauthorized_callback: Incomplete | ||
needs_refresh_callback: Incomplete | ||
id_attribute: Incomplete | ||
def __init__(self, app: Incomplete | None = ..., add_context_processor: bool = ...) -> None: ... | ||
def setup_app(self, app, add_context_processor: bool = ...) -> None: ... | ||
def init_app(self, app, add_context_processor: bool = ...) -> None: ... | ||
def unauthorized(self): ... | ||
_C = t.TypeVar("_C") | ||
def user_loader(self, callback: _C) -> _C: ... | ||
@property | ||
def user_callback(self): ... | ||
def request_loader(self, callback): ... | ||
@property | ||
def request_callback(self): ... | ||
def unauthorized_handler(self, callback): ... | ||
def needs_refresh_handler(self, callback): ... | ||
def needs_refresh(self): ... | ||
def header_loader(self, callback): ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from _typeshed import Incomplete | ||
|
||
class UserMixin: | ||
__hash__: Incomplete | ||
@property | ||
def is_active(self): ... | ||
@property | ||
def is_authenticated(self): ... | ||
@property | ||
def is_anonymous(self): ... | ||
def get_id(self): ... | ||
def __eq__(self, other): ... | ||
def __ne__(self, other): ... | ||
|
||
class AnonymousUserMixin: | ||
@property | ||
def is_authenticated(self): ... | ||
@property | ||
def is_active(self): ... | ||
@property | ||
def is_anonymous(self): ... | ||
def get_id(self) -> None: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from _typeshed import Incomplete | ||
|
||
user_logged_in: Incomplete | ||
user_logged_out: Incomplete | ||
user_loaded_from_cookie: Incomplete | ||
user_loaded_from_request: Incomplete | ||
user_login_confirmed: Incomplete | ||
user_unauthorized: Incomplete | ||
user_needs_refresh: Incomplete | ||
user_accessed: Incomplete | ||
session_protected: Incomplete | ||
|
||
def __getattr__(name): ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import typing as t | ||
from .config import COOKIE_NAME as COOKIE_NAME, EXEMPT_METHODS as EXEMPT_METHODS | ||
from .signals import user_logged_in as user_logged_in, user_logged_out as user_logged_out, user_login_confirmed as user_login_confirmed | ||
from _typeshed import Incomplete | ||
|
||
current_user: Incomplete | ||
|
||
def encode_cookie(payload, key: Incomplete | None = ...): ... | ||
def decode_cookie(cookie, key: Incomplete | None = ...): ... | ||
def make_next_param(login_url, current_url): ... | ||
def expand_login_view(login_view): ... | ||
def login_url(login_view, next_url: Incomplete | None = ..., next_field: str = ...): ... | ||
def login_fresh(): ... | ||
def login_remembered(): ... | ||
def login_user(user, remember: bool = ..., duration: Incomplete | None = ..., force: bool = ..., fresh: bool = ...): ... | ||
def logout_user() -> bool: ... | ||
def confirm_login() -> None: ... | ||
|
||
_F = t.TypeVar("_F") | ||
|
||
def login_required(func: _F) -> _F: ... | ||
def fresh_login_required(func): ... | ||
def set_login_view(login_view, blueprint: Incomplete | None = ...) -> None: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.