square-authentication 5.2.0__tar.gz → 6.0.1__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-5.2.0 → square_authentication-6.0.1}/PKG-INFO +9 -1
- {square_authentication-5.2.0 → square_authentication-6.0.1}/README.md +8 -0
- {square_authentication-5.2.0 → square_authentication-6.0.1}/setup.py +1 -1
- {square_authentication-5.2.0 → square_authentication-6.0.1}/square_authentication/routes/core.py +4 -5
- {square_authentication-5.2.0 → square_authentication-6.0.1}/square_authentication/routes/profile.py +20 -2
- {square_authentication-5.2.0 → square_authentication-6.0.1}/square_authentication.egg-info/PKG-INFO +9 -1
- {square_authentication-5.2.0 → square_authentication-6.0.1}/setup.cfg +0 -0
- {square_authentication-5.2.0 → square_authentication-6.0.1}/square_authentication/__init__.py +0 -0
- {square_authentication-5.2.0 → square_authentication-6.0.1}/square_authentication/configuration.py +0 -0
- {square_authentication-5.2.0 → square_authentication-6.0.1}/square_authentication/data/config.ini +0 -0
- {square_authentication-5.2.0 → square_authentication-6.0.1}/square_authentication/main.py +0 -0
- {square_authentication-5.2.0 → square_authentication-6.0.1}/square_authentication/messages.py +0 -0
- {square_authentication-5.2.0 → square_authentication-6.0.1}/square_authentication/pydantic_models/__init__.py +0 -0
- {square_authentication-5.2.0 → square_authentication-6.0.1}/square_authentication/pydantic_models/core.py +0 -0
- {square_authentication-5.2.0 → square_authentication-6.0.1}/square_authentication/routes/__init__.py +0 -0
- {square_authentication-5.2.0 → square_authentication-6.0.1}/square_authentication/routes/utility.py +0 -0
- {square_authentication-5.2.0 → square_authentication-6.0.1}/square_authentication/utils/__init__.py +0 -0
- {square_authentication-5.2.0 → square_authentication-6.0.1}/square_authentication/utils/encryption.py +0 -0
- {square_authentication-5.2.0 → square_authentication-6.0.1}/square_authentication/utils/token.py +0 -0
- {square_authentication-5.2.0 → square_authentication-6.0.1}/square_authentication.egg-info/SOURCES.txt +0 -0
- {square_authentication-5.2.0 → square_authentication-6.0.1}/square_authentication.egg-info/dependency_links.txt +0 -0
- {square_authentication-5.2.0 → square_authentication-6.0.1}/square_authentication.egg-info/requires.txt +0 -0
- {square_authentication-5.2.0 → square_authentication-6.0.1}/square_authentication.egg-info/top_level.txt +0 -0
- {square_authentication-5.2.0 → square_authentication-6.0.1}/tests/test_1.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: square_authentication
|
3
|
-
Version:
|
3
|
+
Version: 6.0.1
|
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,14 @@ pip install square_authentication
|
|
53
53
|
|
54
54
|
## changelog
|
55
55
|
|
56
|
+
### v6.0.1
|
57
|
+
|
58
|
+
- delete previous profile photo from file store after successfully updating profile photo.
|
59
|
+
|
60
|
+
### v6.0.0
|
61
|
+
|
62
|
+
- add profile details in get_user_details_v0 instead of credentials keyword.
|
63
|
+
|
56
64
|
### v5.2.0
|
57
65
|
|
58
66
|
- add temp folder to .gitignore.
|
@@ -16,6 +16,14 @@ pip install square_authentication
|
|
16
16
|
|
17
17
|
## changelog
|
18
18
|
|
19
|
+
### v6.0.1
|
20
|
+
|
21
|
+
- delete previous profile photo from file store after successfully updating profile photo.
|
22
|
+
|
23
|
+
### v6.0.0
|
24
|
+
|
25
|
+
- add profile details in get_user_details_v0 instead of credentials keyword.
|
26
|
+
|
19
27
|
### v5.2.0
|
20
28
|
|
21
29
|
- add temp folder to .gitignore.
|
{square_authentication-5.2.0 → square_authentication-6.0.1}/square_authentication/routes/core.py
RENAMED
@@ -1,3 +1,4 @@
|
|
1
|
+
import copy
|
1
2
|
from datetime import datetime, timedelta, timezone
|
2
3
|
from typing import Annotated, List
|
3
4
|
|
@@ -302,16 +303,14 @@ async def get_user_details_v0(
|
|
302
303
|
),
|
303
304
|
)["data"]["main"]
|
304
305
|
)
|
306
|
+
user_profile = copy.deepcopy(local_list_response_user_profile[0])
|
307
|
+
del user_profile[UserProfile.user_id.name]
|
305
308
|
"""
|
306
309
|
return value
|
307
310
|
"""
|
308
311
|
return_this = {
|
309
312
|
"user_id": user_id,
|
310
|
-
"
|
311
|
-
"username": local_list_response_user_profile[0][
|
312
|
-
UserProfile.user_profile_username.name
|
313
|
-
],
|
314
|
-
},
|
313
|
+
"profile": user_profile,
|
315
314
|
"apps": [
|
316
315
|
y[App.app_name.name]
|
317
316
|
for y in local_list_app
|
{square_authentication-5.2.0 → square_authentication-6.0.1}/square_authentication/routes/profile.py
RENAMED
@@ -74,7 +74,9 @@ async def update_profile_photo_v0(
|
|
74
74
|
main process
|
75
75
|
"""
|
76
76
|
# uploading to square file store
|
77
|
-
destination_path =
|
77
|
+
destination_path = os.path.join(
|
78
|
+
"temp", user_id, "profile_photo", profile_photo.filename
|
79
|
+
)
|
78
80
|
os.makedirs(os.path.dirname(destination_path), exist_ok=True)
|
79
81
|
with open(destination_path, "wb") as out_file:
|
80
82
|
content = await profile_photo.read()
|
@@ -89,6 +91,18 @@ async def update_profile_photo_v0(
|
|
89
91
|
os.remove(destination_path)
|
90
92
|
|
91
93
|
# adding file storage token to user profile
|
94
|
+
old_profile_photo_response = global_object_square_database_helper.get_rows_v0(
|
95
|
+
database_name=global_string_database_name,
|
96
|
+
schema_name=global_string_schema_name,
|
97
|
+
table_name=UserProfile.__tablename__,
|
98
|
+
filters=FiltersV0(
|
99
|
+
root={UserProfile.user_id.name: FilterConditionsV0(eq=user_id)}
|
100
|
+
),
|
101
|
+
apply_filters=True,
|
102
|
+
)
|
103
|
+
old_profile_photo_token = old_profile_photo_response["data"]["main"][0][
|
104
|
+
"user_profile_photo_storage_token"
|
105
|
+
]
|
92
106
|
profile_update_response = global_object_square_database_helper.edit_rows_v0(
|
93
107
|
data={
|
94
108
|
UserProfile.user_profile_photo_storage_token.name: file_upload_response[
|
@@ -96,13 +110,17 @@ async def update_profile_photo_v0(
|
|
96
110
|
]["main"]
|
97
111
|
},
|
98
112
|
filters=FiltersV0(
|
99
|
-
{UserProfile.user_id.name: FilterConditionsV0(eq=user_id)}
|
113
|
+
root={UserProfile.user_id.name: FilterConditionsV0(eq=user_id)}
|
100
114
|
),
|
101
115
|
database_name=global_string_database_name,
|
102
116
|
schema_name=global_string_schema_name,
|
103
117
|
table_name=UserProfile.__tablename__,
|
104
118
|
apply_filters=True,
|
105
119
|
)
|
120
|
+
if old_profile_photo_token:
|
121
|
+
global_object_square_file_store_helper.delete_file_v0(
|
122
|
+
[old_profile_photo_token]
|
123
|
+
)
|
106
124
|
|
107
125
|
"""
|
108
126
|
return value
|
{square_authentication-5.2.0 → square_authentication-6.0.1}/square_authentication.egg-info/PKG-INFO
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: square_authentication
|
3
|
-
Version:
|
3
|
+
Version: 6.0.1
|
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,14 @@ pip install square_authentication
|
|
53
53
|
|
54
54
|
## changelog
|
55
55
|
|
56
|
+
### v6.0.1
|
57
|
+
|
58
|
+
- delete previous profile photo from file store after successfully updating profile photo.
|
59
|
+
|
60
|
+
### v6.0.0
|
61
|
+
|
62
|
+
- add profile details in get_user_details_v0 instead of credentials keyword.
|
63
|
+
|
56
64
|
### v5.2.0
|
57
65
|
|
58
66
|
- add temp folder to .gitignore.
|
File without changes
|
{square_authentication-5.2.0 → square_authentication-6.0.1}/square_authentication/__init__.py
RENAMED
File without changes
|
{square_authentication-5.2.0 → square_authentication-6.0.1}/square_authentication/configuration.py
RENAMED
File without changes
|
{square_authentication-5.2.0 → square_authentication-6.0.1}/square_authentication/data/config.ini
RENAMED
File without changes
|
File without changes
|
{square_authentication-5.2.0 → square_authentication-6.0.1}/square_authentication/messages.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{square_authentication-5.2.0 → square_authentication-6.0.1}/square_authentication/routes/__init__.py
RENAMED
File without changes
|
{square_authentication-5.2.0 → square_authentication-6.0.1}/square_authentication/routes/utility.py
RENAMED
File without changes
|
{square_authentication-5.2.0 → square_authentication-6.0.1}/square_authentication/utils/__init__.py
RENAMED
File without changes
|
File without changes
|
{square_authentication-5.2.0 → square_authentication-6.0.1}/square_authentication/utils/token.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|