square-authentication 8.0.1__py3-none-any.whl → 9.0.0__py3-none-any.whl

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.
@@ -1975,6 +1975,7 @@ async def update_password_v0(
1975
1975
  @router.get("/validate_and_get_payload_from_token/v0")
1976
1976
  @global_object_square_logger.auto_logger()
1977
1977
  async def validate_and_get_payload_from_token_v0(
1978
+ app_id: int,
1978
1979
  token: Annotated[str, Header()],
1979
1980
  token_type: TokenType = Query(...),
1980
1981
  ):
@@ -2022,6 +2023,15 @@ async def validate_and_get_payload_from_token_v0(
2022
2023
  status_code=status.HTTP_400_BAD_REQUEST,
2023
2024
  detail=output_content,
2024
2025
  )
2026
+ if local_dict_token_payload["app_id"] != app_id:
2027
+ output_content = get_api_output_in_standard_format(
2028
+ message=messages["GENERIC_400"],
2029
+ log=f"app_id: {app_id} does not match with token app_id: {local_dict_token_payload['app_id']}.",
2030
+ )
2031
+ raise HTTPException(
2032
+ status_code=status.HTTP_400_BAD_REQUEST,
2033
+ detail=output_content,
2034
+ )
2025
2035
  except HTTPException as http_exception:
2026
2036
  raise
2027
2037
  except Exception as error:
@@ -2695,6 +2705,7 @@ async def reset_password_and_login_using_backup_code_v0(
2695
2705
  "user_id": user_id,
2696
2706
  "access_token": local_str_access_token,
2697
2707
  "refresh_token": local_str_refresh_token,
2708
+ "refresh_token_expiry_time": local_object_refresh_token_expiry_time.isoformat(),
2698
2709
  }
2699
2710
  },
2700
2711
  )
@@ -3227,6 +3238,7 @@ async def reset_password_and_login_using_reset_email_code_v0(
3227
3238
  "user_id": user_id,
3228
3239
  "access_token": local_str_access_token,
3229
3240
  "refresh_token": local_str_refresh_token,
3241
+ "refresh_token_expiry_time": local_object_refresh_token_expiry_time.isoformat(),
3230
3242
  }
3231
3243
  },
3232
3244
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: square_authentication
3
- Version: 8.0.1
3
+ Version: 9.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
@@ -54,6 +54,17 @@ pip install square_authentication
54
54
 
55
55
  ## changelog
56
56
 
57
+ ### v9.0.0
58
+
59
+ - core
60
+ - **breaking change**: new mandatory parameter `app_id` in validate_and_get_payload_from_token_v0.
61
+
62
+ ### v8.0.2
63
+
64
+ - core
65
+ - add refresh_token_expiry_time in output for reset_password_and_login_using_backup_code_v0 and
66
+ reset_password_and_login_using_reset_email_code_v0.
67
+
57
68
  ### v8.0.1
58
69
 
59
70
  - core
@@ -8,14 +8,14 @@ square_authentication/pydantic_models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCe
8
8
  square_authentication/pydantic_models/core.py,sha256=7H1N1y8VpPA_-NrudX8j0YG_YzpHnPXZuwtGaKRPSy0,1268
9
9
  square_authentication/pydantic_models/profile.py,sha256=tq7RJMfbMBMi7FaRQksWJR3Iucr2l8P2ziKgQvV4owg,110
10
10
  square_authentication/routes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
- square_authentication/routes/core.py,sha256=KPeF6PBLwoTj1s8Bv70LgVmYuyeaODTFvvUy04OI_mU,131868
11
+ square_authentication/routes/core.py,sha256=P2eDxWIN45NQ__U4RPhPdYMwg0TswnrEhCc9JbkdfBo,132563
12
12
  square_authentication/routes/profile.py,sha256=4J-_ulVW0bDkoDO1utdzv_2_OraGbtVnQmcpws3Ecu4,24466
13
13
  square_authentication/routes/utility.py,sha256=KDr8KdkT0jAGPjfP-b5XXYG7p49WU7J1FiK6oSIckQI,1779
14
14
  square_authentication/utils/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
15
15
  square_authentication/utils/core.py,sha256=2jMPnbbURNIMiajYfWIlGNblI7DocWNPZcU_psAq4SE,1567
16
16
  square_authentication/utils/encryption.py,sha256=WakaiEAgWpTJltxBzqOtv81_DCDKfzJqt60fWSPoNvo,2027
17
17
  square_authentication/utils/token.py,sha256=t-RPBY4cYyT1ro3lkLBTOy2BeRGBfluBVBivL5DLmDg,680
18
- square_authentication-8.0.1.dist-info/METADATA,sha256=868N6fDQ0P0votcDnLznBFv8ZoRVvZXaT3AdUMy5fuU,8559
19
- square_authentication-8.0.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
20
- square_authentication-8.0.1.dist-info/top_level.txt,sha256=wDssVJIl9KIEJPj5rR3rv4uRI7yCndMBrvHd_6BGXQA,22
21
- square_authentication-8.0.1.dist-info/RECORD,,
18
+ square_authentication-9.0.0.dist-info/METADATA,sha256=Y_sxMb2AKmhbrWgjIMfEP7lSe3YKAMdpatBSYfjOnII,8860
19
+ square_authentication-9.0.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
20
+ square_authentication-9.0.0.dist-info/top_level.txt,sha256=wDssVJIl9KIEJPj5rR3rv4uRI7yCndMBrvHd_6BGXQA,22
21
+ square_authentication-9.0.0.dist-info/RECORD,,