square-authentication 6.2.2__tar.gz → 7.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {square_authentication-6.2.2 → square_authentication-7.0.0}/PKG-INFO +26 -1
- {square_authentication-6.2.2 → square_authentication-7.0.0}/README.md +25 -0
- square_authentication-7.0.0/pyproject.toml +3 -0
- {square_authentication-6.2.2 → square_authentication-7.0.0}/setup.py +1 -1
- {square_authentication-6.2.2 → square_authentication-7.0.0}/square_authentication/configuration.py +6 -0
- {square_authentication-6.2.2 → square_authentication-7.0.0}/square_authentication/data/config.sample.ini +4 -1
- {square_authentication-6.2.2 → square_authentication-7.0.0}/square_authentication/data/config.testing.sample.ini +4 -1
- {square_authentication-6.2.2 → square_authentication-7.0.0}/square_authentication/messages.py +10 -0
- {square_authentication-6.2.2 → square_authentication-7.0.0}/square_authentication/pydantic_models/core.py +12 -0
- square_authentication-7.0.0/square_authentication/pydantic_models/profile.py +5 -0
- {square_authentication-6.2.2 → square_authentication-7.0.0}/square_authentication/routes/core.py +673 -41
- square_authentication-7.0.0/square_authentication/routes/profile.py +610 -0
- {square_authentication-6.2.2 → square_authentication-7.0.0}/square_authentication.egg-info/PKG-INFO +26 -1
- {square_authentication-6.2.2 → square_authentication-7.0.0}/square_authentication.egg-info/SOURCES.txt +5 -0
- square_authentication-7.0.0/tests/test_delete_user.py +14 -0
- square_authentication-7.0.0/tests/test_login.py +13 -0
- square_authentication-7.0.0/tests/test_update_profile.py +14 -0
- square_authentication-6.2.2/square_authentication/routes/profile.py +0 -166
- {square_authentication-6.2.2 → square_authentication-7.0.0}/setup.cfg +0 -0
- {square_authentication-6.2.2 → square_authentication-7.0.0}/square_authentication/__init__.py +0 -0
- {square_authentication-6.2.2 → square_authentication-7.0.0}/square_authentication/main.py +0 -0
- {square_authentication-6.2.2 → square_authentication-7.0.0}/square_authentication/pydantic_models/__init__.py +0 -0
- {square_authentication-6.2.2 → square_authentication-7.0.0}/square_authentication/routes/__init__.py +0 -0
- {square_authentication-6.2.2 → square_authentication-7.0.0}/square_authentication/routes/utility.py +0 -0
- {square_authentication-6.2.2 → square_authentication-7.0.0}/square_authentication/utils/__init__.py +0 -0
- {square_authentication-6.2.2 → square_authentication-7.0.0}/square_authentication/utils/encryption.py +0 -0
- {square_authentication-6.2.2 → square_authentication-7.0.0}/square_authentication/utils/token.py +0 -0
- {square_authentication-6.2.2 → square_authentication-7.0.0}/square_authentication.egg-info/dependency_links.txt +0 -0
- {square_authentication-6.2.2 → square_authentication-7.0.0}/square_authentication.egg-info/requires.txt +0 -0
- {square_authentication-6.2.2 → square_authentication-7.0.0}/square_authentication.egg-info/top_level.txt +0 -0
- {square_authentication-6.2.2 → square_authentication-7.0.0}/tests/test_1.py +0 -0
- {square_authentication-6.2.2 → square_authentication-7.0.0}/tests/test_username.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: square_authentication
|
3
|
-
Version:
|
3
|
+
Version: 7.0.0
|
4
4
|
Summary: authentication layer for my personal server.
|
5
5
|
Home-page: https://github.com/thepmsquare/square_authentication
|
6
6
|
Author: thePmSquare
|
@@ -53,6 +53,31 @@ pip install square_authentication
|
|
53
53
|
|
54
54
|
## changelog
|
55
55
|
|
56
|
+
### v7.0.0
|
57
|
+
|
58
|
+
- internal support for UserAuthProvider.
|
59
|
+
- internal support for username shifted from UserProfile to User.
|
60
|
+
- internal support for phone number country code in UserProfile.
|
61
|
+
- core
|
62
|
+
- register_username_v0 fixed to account for changes mentioned above and creates empty profile.
|
63
|
+
- login_username_v0 fixed to account for changes mentioned above.
|
64
|
+
- update_username_v0 fixed to account for changes mentioned above.
|
65
|
+
- **breaking change**: delete_user_v0 is now a POST method instead of DELETE.
|
66
|
+
- add generate_account_backup_codes_v0.
|
67
|
+
- add reset_password_and_login_using_backup_code_v0.
|
68
|
+
- add validation for email verification when adding email as recovery method in update_user_recovery_methods_v0.
|
69
|
+
- add send_reset_password_email_v0.
|
70
|
+
- profile
|
71
|
+
- add update_profile_details_v0.
|
72
|
+
- add send_verification_email_v0.
|
73
|
+
- add validate_email_verification_code_v0.
|
74
|
+
- tests
|
75
|
+
- add test cases and fixtures for login_username_v0.
|
76
|
+
- add test cases and fixtures for delete_user_v0.
|
77
|
+
- add test cases and fixtures for update_profile_details_v0.
|
78
|
+
- env
|
79
|
+
- add EMAIL section and MAIL_GUN_API_KEY variable.
|
80
|
+
|
56
81
|
### v6.2.2
|
57
82
|
|
58
83
|
- remove config.ini and config.testing.ini from version control.
|
@@ -16,6 +16,31 @@ pip install square_authentication
|
|
16
16
|
|
17
17
|
## changelog
|
18
18
|
|
19
|
+
### v7.0.0
|
20
|
+
|
21
|
+
- internal support for UserAuthProvider.
|
22
|
+
- internal support for username shifted from UserProfile to User.
|
23
|
+
- internal support for phone number country code in UserProfile.
|
24
|
+
- core
|
25
|
+
- register_username_v0 fixed to account for changes mentioned above and creates empty profile.
|
26
|
+
- login_username_v0 fixed to account for changes mentioned above.
|
27
|
+
- update_username_v0 fixed to account for changes mentioned above.
|
28
|
+
- **breaking change**: delete_user_v0 is now a POST method instead of DELETE.
|
29
|
+
- add generate_account_backup_codes_v0.
|
30
|
+
- add reset_password_and_login_using_backup_code_v0.
|
31
|
+
- add validation for email verification when adding email as recovery method in update_user_recovery_methods_v0.
|
32
|
+
- add send_reset_password_email_v0.
|
33
|
+
- profile
|
34
|
+
- add update_profile_details_v0.
|
35
|
+
- add send_verification_email_v0.
|
36
|
+
- add validate_email_verification_code_v0.
|
37
|
+
- tests
|
38
|
+
- add test cases and fixtures for login_username_v0.
|
39
|
+
- add test cases and fixtures for delete_user_v0.
|
40
|
+
- add test cases and fixtures for update_profile_details_v0.
|
41
|
+
- env
|
42
|
+
- add EMAIL section and MAIL_GUN_API_KEY variable.
|
43
|
+
|
19
44
|
### v6.2.2
|
20
45
|
|
21
46
|
- remove config.ini and config.testing.ini from version control.
|
{square_authentication-6.2.2 → square_authentication-7.0.0}/square_authentication/configuration.py
RENAMED
@@ -94,6 +94,12 @@ try:
|
|
94
94
|
ldict_configuration["SQUARE_FILE_STORE_HELPER"]["SQUARE_FILE_STORE_PORT"]
|
95
95
|
)
|
96
96
|
# ===========================================
|
97
|
+
|
98
|
+
# ===========================================
|
99
|
+
# EMAIL
|
100
|
+
|
101
|
+
MAIL_GUN_API_KEY = ldict_configuration["EMAIL"]["MAIL_GUN_API_KEY"]
|
102
|
+
# ===========================================
|
97
103
|
# Initialize logger
|
98
104
|
global_object_square_logger = SquareLogger(
|
99
105
|
pstr_log_file_name=config_str_log_file_name,
|
{square_authentication-6.2.2 → square_authentication-7.0.0}/square_authentication/messages.py
RENAMED
@@ -13,8 +13,18 @@ messages = {
|
|
13
13
|
"GENERIC_READ_SUCCESSFUL": "data retrieved successfully.",
|
14
14
|
"GENERIC_UPDATE_SUCCESSFUL": "your information has been updated successfully.",
|
15
15
|
"GENERIC_DELETE_SUCCESSFUL": "your records have been deleted successfully.",
|
16
|
+
"GENERIC_ACTION_SUCCESSFUL": "the action was completed successfully.",
|
16
17
|
"GENERIC_400": "the request is invalid or cannot be processed.",
|
17
18
|
"GENERIC_500": "an internal server error occurred. please try again later.",
|
18
19
|
"INVALID_FILE_FORMAT": "the file format is not supported. please upload a valid file.",
|
19
20
|
"FILE_SIZE_EXCEEDS_LIMIT": "the file size exceeds the limit. please upload a smaller file.",
|
21
|
+
"INCORRECT_AUTH_PROVIDER": "you have not linked this authentication provider to your account. please link it first.",
|
22
|
+
"INVALID_EMAIL_FORMAT": "the email address is invalid. please provide a valid email address.",
|
23
|
+
"INVALID_PHONE_NUMBER_FORMAT": "the phone number is invalid. please provide a valid phone number.",
|
24
|
+
"GENERIC_MISSING_REQUIRED_FIELD": "a required field is missing. please check your input and try again.",
|
25
|
+
"RECOVERY_METHOD_NOT_ENABLED": "the recovery method you are trying to use is not enabled for your account.",
|
26
|
+
"INCORRECT_BACKUP_CODE": "the backup code you provided is incorrect or has already been used. please try again with a valid code.",
|
27
|
+
"EMAIL_ALREADY_VERIFIED": "your email address has already been verified.",
|
28
|
+
"INCORRECT_VERIFICATION_CODE": "the verification code you entered is incorrect or has expired. please request a new code.",
|
29
|
+
"EMAIL_NOT_VERIFIED": "your email address has not been verified. please verify your email to continue.",
|
20
30
|
}
|
@@ -33,3 +33,15 @@ class TokenType(Enum):
|
|
33
33
|
|
34
34
|
class LogoutAppsV0(BaseModel):
|
35
35
|
app_ids: List[int]
|
36
|
+
|
37
|
+
|
38
|
+
class ResetPasswordAndLoginUsingBackupCodeV0(BaseModel):
|
39
|
+
backup_code: str
|
40
|
+
username: str
|
41
|
+
new_password: str
|
42
|
+
app_id: int
|
43
|
+
|
44
|
+
|
45
|
+
class SendResetPasswordEmailV0(BaseModel):
|
46
|
+
username: str
|
47
|
+
app_id: int
|