square-authentication 4.5.1__tar.gz → 5.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.
Files changed (22) hide show
  1. {square_authentication-4.5.1 → square_authentication-5.0.1}/PKG-INFO +9 -1
  2. {square_authentication-4.5.1 → square_authentication-5.0.1}/README.md +8 -0
  3. {square_authentication-4.5.1 → square_authentication-5.0.1}/setup.py +1 -1
  4. {square_authentication-4.5.1 → square_authentication-5.0.1}/square_authentication/routes/core.py +18 -2
  5. {square_authentication-4.5.1 → square_authentication-5.0.1}/square_authentication.egg-info/PKG-INFO +9 -1
  6. {square_authentication-4.5.1 → square_authentication-5.0.1}/setup.cfg +0 -0
  7. {square_authentication-4.5.1 → square_authentication-5.0.1}/square_authentication/__init__.py +0 -0
  8. {square_authentication-4.5.1 → square_authentication-5.0.1}/square_authentication/configuration.py +0 -0
  9. {square_authentication-4.5.1 → square_authentication-5.0.1}/square_authentication/data/config.ini +0 -0
  10. {square_authentication-4.5.1 → square_authentication-5.0.1}/square_authentication/main.py +0 -0
  11. {square_authentication-4.5.1 → square_authentication-5.0.1}/square_authentication/messages.py +0 -0
  12. {square_authentication-4.5.1 → square_authentication-5.0.1}/square_authentication/pydantic_models/__init__.py +0 -0
  13. {square_authentication-4.5.1 → square_authentication-5.0.1}/square_authentication/pydantic_models/core.py +0 -0
  14. {square_authentication-4.5.1 → square_authentication-5.0.1}/square_authentication/routes/__init__.py +0 -0
  15. {square_authentication-4.5.1 → square_authentication-5.0.1}/square_authentication/routes/utility.py +0 -0
  16. {square_authentication-4.5.1 → square_authentication-5.0.1}/square_authentication/utils/__init__.py +0 -0
  17. {square_authentication-4.5.1 → square_authentication-5.0.1}/square_authentication/utils/encryption.py +0 -0
  18. {square_authentication-4.5.1 → square_authentication-5.0.1}/square_authentication/utils/token.py +0 -0
  19. {square_authentication-4.5.1 → square_authentication-5.0.1}/square_authentication.egg-info/SOURCES.txt +0 -0
  20. {square_authentication-4.5.1 → square_authentication-5.0.1}/square_authentication.egg-info/dependency_links.txt +0 -0
  21. {square_authentication-4.5.1 → square_authentication-5.0.1}/square_authentication.egg-info/requires.txt +0 -0
  22. {square_authentication-4.5.1 → square_authentication-5.0.1}/square_authentication.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: square_authentication
3
- Version: 4.5.1
3
+ Version: 5.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
@@ -32,6 +32,14 @@ pip install square_authentication
32
32
 
33
33
  ## changelog
34
34
 
35
+ ### v5.0.1
36
+
37
+ - fix typo in return value of get_user_details_v0.
38
+
39
+ ### v5.0.0
40
+
41
+ - change get_user_details_v0 to return app name instead of app ids.
42
+
35
43
  ### v4.5.1
36
44
 
37
45
  - fix auto docker image build github action.
@@ -16,6 +16,14 @@ pip install square_authentication
16
16
 
17
17
  ## changelog
18
18
 
19
+ ### v5.0.1
20
+
21
+ - fix typo in return value of get_user_details_v0.
22
+
23
+ ### v5.0.0
24
+
25
+ - change get_user_details_v0 to return app name instead of app ids.
26
+
19
27
  ### v4.5.1
20
28
 
21
29
  - fix auto docker image build github action.
@@ -4,7 +4,7 @@ package_name = "square_authentication"
4
4
 
5
5
  setup(
6
6
  name=package_name,
7
- version="4.5.1",
7
+ version="5.0.1",
8
8
  packages=find_packages(),
9
9
  package_data={
10
10
  package_name: ["data/*"],
@@ -264,6 +264,13 @@ async def get_user_details_v0(
264
264
  """
265
265
  main process
266
266
  """
267
+ local_list_app = global_object_square_database_helper.get_rows_v0(
268
+ database_name=global_string_database_name,
269
+ schema_name=global_string_public_schema_name,
270
+ table_name=App.__tablename__,
271
+ apply_filters=False,
272
+ filters=FiltersV0(root={}),
273
+ )["data"]["main"]
267
274
  local_list_response_user_app = global_object_square_database_helper.get_rows_v0(
268
275
  database_name=global_string_database_name,
269
276
  schema_name=global_string_schema_name,
@@ -307,10 +314,19 @@ async def get_user_details_v0(
307
314
  UserCredential.user_credential_username.name
308
315
  ],
309
316
  },
310
- "apps": [x[UserApp.app_id.name] for x in local_list_response_user_app],
317
+ "apps": [
318
+ y[App.app_name.name]
319
+ for y in local_list_app
320
+ if y[App.app_id.name]
321
+ in [x[UserApp.app_id.name] for x in local_list_response_user_app]
322
+ ],
311
323
  "sessions": [
312
324
  {
313
- "app_id": x[UserApp.app_id.name],
325
+ "app_name": [
326
+ y[App.app_name.name]
327
+ for y in local_list_app
328
+ if y[App.app_id.name] == x[UserApp.app_id.name]
329
+ ][0],
314
330
  "active_sessions": len(
315
331
  [
316
332
  y
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: square-authentication
3
- Version: 4.5.1
3
+ Version: 5.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
@@ -32,6 +32,14 @@ pip install square_authentication
32
32
 
33
33
  ## changelog
34
34
 
35
+ ### v5.0.1
36
+
37
+ - fix typo in return value of get_user_details_v0.
38
+
39
+ ### v5.0.0
40
+
41
+ - change get_user_details_v0 to return app name instead of app ids.
42
+
35
43
  ### v4.5.1
36
44
 
37
45
  - fix auto docker image build github action.