Debian Codegraph @

flask_security/__init__.py

raw
1 """
2 flask_security
3 ~~~~~~~~~~~~~~
4
5 Flask-Security is a Flask extension that aims to add comprehensive security
6 to Flask applications.
7
8 :copyright: (c) 2012-2019 by Matt Wright.
9 :copyright: (c) 2019-2026 by J. Christopher Wagner.
10 :license: MIT, see LICENSE for more details.
11 """
12
13 from __future__ import annotations
14
15 # flake8: noqa: F401
16 from .changeable import admin_change_password as admin_change_password
17 from .change_email import ChangeEmailForm as ChangeEmailForm
18 from .change_username import ChangeUsernameForm as ChangeUsernameForm
19 from .core import (
20 Security as Security,
21 RefreshTrackerMixin as RefreshTrackerMixin,
22 RoleMixin as RoleMixin,
23 UserMixin as UserMixin,
24 WebAuthnMixin as WebAuthnMixin,
25 FormInfo as FormInfo,
26 current_user as current_user,
27 )
28 from .datastore import (
29 FSQLALiteUserDatastore as FSQLALiteUserDatastore,
30 UserDatastore as UserDatastore,
31 SQLAlchemyUserDatastore as SQLAlchemyUserDatastore,
32 AsaList as AsaList,
33 MongoEngineUserDatastore as MongoEngineUserDatastore,
34 PeeweeUserDatastore as PeeweeUserDatastore,
35 SQLAlchemySessionUserDatastore as SQLAlchemySessionUserDatastore,
36 )
37 from .decorators import (
38 auth_token_required as auth_token_required,
39 anonymous_user_required as anonymous_user_required,
40 handle_csrf as handle_csrf,
41 http_auth_required as http_auth_required,
42 login_required as login_required,
43 roles_accepted as roles_accepted,
44 roles_required as roles_required,
45 auth_required as auth_required,
46 permissions_accepted as permissions_accepted,
47 permissions_required as permissions_required,
48 unauth_csrf as unauth_csrf,
49 )
50 from .forms import (
51 ChangePasswordForm as ChangePasswordForm,
52 ConfirmRegisterForm as ConfirmRegisterForm,
53 Form as Form,
54 ForgotPasswordForm as ForgotPasswordForm,
55 LoginForm as LoginForm,
56 LogoutForm as LogoutForm,
57 PasswordlessLoginForm as PasswordlessLoginForm,
58 RegisterForm as RegisterForm,
59 RegisterFormV2 as RegisterFormV2,
60 ResetPasswordForm as ResetPasswordForm,
61 SendConfirmationForm as SendConfirmationForm,
62 TwoFactorRescueForm as TwoFactorRescueForm,
63 TwoFactorSetupForm as TwoFactorSetupForm,
64 TwoFactorVerifyCodeForm as TwoFactorVerifyCodeForm,
65 unique_identity_attribute as unique_identity_attribute,
66 UsernameRecoveryForm as UsernameRecoveryForm,
67 VerifyForm as VerifyForm,
68 )
69 from .mail_util import (
70 MailUtil as MailUtil,
71 EmailValidateException as EmailValidateException,
72 )
73 from .oauth_glue import OAuthGlue as OAuthGlue
74 from .oauth_provider import FsOAuthProvider as FsOAuthProvider
75 from .password_util import PasswordUtil as PasswordUtil
76 from .phone_util import PhoneUtil as PhoneUtil
77 from .recovery_codes import (
78 MfRecoveryCodesUtil as MfRecoveryCodesUtil,
79 MfRecoveryForm as MfRecoveryForm,
80 MfRecoveryCodesForm as MfRecoveryCodesForm,
81 )
82 from .tokens import RefreshTokenForm as RefreshTokenForm
83 from .signals import (
84 change_email_confirmed as change_email_confirmed,
85 change_email_instructions_sent as change_email_instructions_sent,
86 confirm_instructions_sent as confirm_instructions_sent,
87 login_instructions_sent as login_instructions_sent,
88 password_changed as password_changed,
89 password_reset as password_reset,
90 refresh_tracker_created as refresh_tracker_created,
91 refresh_tracker_revoked as refresh_tracker_revoked,
92 reset_password_instructions_sent as reset_password_instructions_sent,
93 tf_code_confirmed as tf_code_confirmed,
94 tf_profile_changed as tf_profile_changed,
95 tf_security_token_sent as tf_security_token_sent,
96 tf_disabled as tf_disabled,
97 user_authenticated as user_authenticated,
98 user_failed_authn as user_failed_authn,
99 user_unauthenticated as user_unauthenticated,
100 user_confirmed as user_confirmed,
101 user_registered as user_registered,
102 user_not_registered as user_not_registered,
103 username_recovery_email_sent as username_recovery_email_sent,
104 username_changed as username_changed,
105 us_security_token_sent as us_security_token_sent,
106 us_profile_changed as us_profile_changed,
107 wan_deleted as wan_deleted,
108 wan_registered as wan_registered,
109 )
110 from .totp import Totp as Totp
111 from .twofactor import tf_send_security_token as tf_send_security_token
112 from .tf_plugin import TwoFactorSelectForm as TwoFactorSelectForm
113 from .unified_signin import (
114 UnifiedSigninForm as UnifiedSigninForm,
115 UnifiedSigninSetupForm as UnifiedSigninSetupForm,
116 UnifiedSigninSetupValidateForm as UnifiedSigninSetupValidateForm,
117 UnifiedVerifyForm as UnifiedVerifyForm,
118 us_send_security_token as us_send_security_token,
119 )
120 from .username_util import UsernameUtil as UsernameUtil
121 from .utils import (
122 SmsSenderBaseClass as SmsSenderBaseClass,
123 SmsSenderFactory as SmsSenderFactory,
124 check_and_get_token_status as check_and_get_token_status,
125 check_and_update_authn_fresh as check_and_update_authn_fresh,
126 get_hmac as get_hmac,
127 get_request_attr as get_request_attr,
128 get_url as get_url,
129 hash_password as hash_password,
130 input_svn as input_svn,
131 login_user as login_user,
132 logout_user as logout_user,
133 lookup_identity as lookup_identity,
134 naive_utcnow as naive_utcnow,
135 password_breached_validator as password_breached_validator,
136 password_complexity_validator as password_complexity_validator,
137 password_length_validator as password_length_validator,
138 pwned as pwned,
139 send_mail as send_mail,
140 transform_url as transform_url,
141 uia_phone_mapper as uia_phone_mapper,
142 uia_email_mapper as uia_email_mapper,
143 uia_username_mapper as uia_username_mapper,
144 url_for_security as url_for_security,
145 verify_password as verify_password,
146 verify_and_update_password as verify_and_update_password,
147 )
148 from .webauthn import (
149 WebAuthnRegisterForm as WebAuthnRegisterForm,
150 WebAuthnRegisterResponseForm as WebAuthnRegisterResponseForm,
151 WebAuthnSigninForm as WebAuthnSigninForm,
152 WebAuthnSigninResponseForm as WebAuthnSigninResponseForm,
153 WebAuthnDeleteForm as WebAuthnDeleteForm,
154 WebAuthnVerifyForm as WebAuthnVerifyForm,
155 )
156 from .webauthn_util import WebauthnUtil as WebauthnUtil
157
158 __version__ = "5.9.1"