maleo-foundation 0.2.41__py3-none-any.whl → 0.2.43__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.
@@ -46,7 +46,10 @@ class Backend(AuthenticationBackend):
46
46
  if decode_token_result.success:
47
47
  type = BaseEnums.TokenType.ACCESS
48
48
  payload = decode_token_result.data
49
- token = Token(type, payload)
49
+ token = Token(
50
+ type=type,
51
+ payload=payload
52
+ )
50
53
  return (
51
54
  Credentials(
52
55
  token=token,
@@ -73,7 +76,10 @@ class Backend(AuthenticationBackend):
73
76
  if decode_token_result.success:
74
77
  type = BaseEnums.TokenType.ACCESS
75
78
  payload = decode_token_result.data
76
- token = Token(type, payload)
79
+ token = Token(
80
+ type=type,
81
+ payload=payload
82
+ )
77
83
  return (
78
84
  Credentials(
79
85
  token=token,
@@ -137,15 +137,15 @@ class BaseMiddleware(BaseHTTPMiddleware):
137
137
  if sign_result.success:
138
138
  response.headers["X-Signature"] = sign_result.data.signature
139
139
  if (authentication.user.is_authenticated
140
- and authentication.credentials.token_type == BaseEnums.TokenType.REFRESH
141
- and authentication.credentials.payload is not None
140
+ and authentication.credentials.token.type == BaseEnums.TokenType.REFRESH
141
+ and authentication.credentials.token.payload is not None
142
142
  and (response.status_code >= 200 and response.status_code < 300)
143
143
  ):
144
144
  #* Regenerate new authorization
145
145
  payload = (
146
146
  MaleoFoundationTokenGeneralTransfers
147
147
  .BaseEncodePayload
148
- .model_validate(authentication.credentials.payload.model_dump())
148
+ .model_validate(authentication.credentials.token.payload.model_dump())
149
149
  )
150
150
  parameters = (
151
151
  MaleoFoundationTokenParametersTransfers
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: maleo_foundation
3
- Version: 0.2.41
3
+ Version: 0.2.43
4
4
  Summary: Foundation package for Maleo
5
5
  Author-email: Agra Bima Yuda <agra@nexmedis.com>
6
6
  License: MIT
@@ -46,8 +46,8 @@ maleo_foundation/managers/client/google/base.py,sha256=eIdd6C2BFIu4EyZ1j017VZaJn
46
46
  maleo_foundation/managers/client/google/parameter.py,sha256=Lnj7mQgxWQpsQwbmDRK5_bF01M1QpM5PS0eZP2q17yQ,1337
47
47
  maleo_foundation/managers/client/google/secret.py,sha256=Ski1CHYeA8vjSk2Oc2Pf4CfFrzT_RcA6NEZwza7gM7Y,4464
48
48
  maleo_foundation/managers/client/google/storage.py,sha256=ECyEBgEvvbTDVfqXey-meGnoU4qvIRU32BxbCuzcaHU,2576
49
- maleo_foundation/middlewares/authentication.py,sha256=yfM9e0YJqwFrLNkUk8eIJVJ-eyRY6u4c1yrWUmVMJuc,4678
50
- maleo_foundation/middlewares/base.py,sha256=8_ENtyB2iKejCOQofESzlAaq_zxDWtHNaq3f10dA020,14554
49
+ maleo_foundation/middlewares/authentication.py,sha256=P75FrLlbq5kDV9uMwXAwdAFM7DNo1k7WX6LM9dHNrcA,4820
50
+ maleo_foundation/middlewares/base.py,sha256=zLlqL_sGVmQrOCIGEUnctkNgSHnXa0TjE7RveyF-o0g,14566
51
51
  maleo_foundation/middlewares/cors.py,sha256=9uvBvY2N6Vxa9RP_YtESxcWo6Doi6uS0lzAG9iLY7Uc,2288
52
52
  maleo_foundation/models/__init__.py,sha256=AaKehO7c1HyKhoTGRmNHDddSeBXkW-_YNrpOGBu8Ms8,246
53
53
  maleo_foundation/models/responses.py,sha256=nszxzni_Q_42bzjrKvUVGeB3GSn4Ba9g-Nqj1dfdJvk,5223
@@ -117,7 +117,7 @@ maleo_foundation/utils/loaders/credential/__init__.py,sha256=qopTKvcMVoTFwyRijeg
117
117
  maleo_foundation/utils/loaders/credential/google.py,sha256=SKsqPuFnAiCcYLf24CxKnMybhVHpgqnq1gGSlThqjts,994
118
118
  maleo_foundation/utils/loaders/key/__init__.py,sha256=hVygcC2ImHc_aVrSrOmyedR8tMUZokWUKCKOSh5ctbo,106
119
119
  maleo_foundation/utils/loaders/key/rsa.py,sha256=gDhyX6iTFtHiluuhFCozaZ3pOLKU2Y9TlrNMK_GVyGU,3796
120
- maleo_foundation-0.2.41.dist-info/METADATA,sha256=DLgcwbVIoByJAS1mCAYMd5QD18S1MvskFTAkKio7ceM,3598
121
- maleo_foundation-0.2.41.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
122
- maleo_foundation-0.2.41.dist-info/top_level.txt,sha256=_iBos3F_bhEOdjOnzeiEYSrCucasc810xXtLBXI8cQc,17
123
- maleo_foundation-0.2.41.dist-info/RECORD,,
120
+ maleo_foundation-0.2.43.dist-info/METADATA,sha256=vvZgsMpUD6ZsLtRyqJ5k7Cu7kuRO_hefpn_7gVoDfgE,3598
121
+ maleo_foundation-0.2.43.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
122
+ maleo_foundation-0.2.43.dist-info/top_level.txt,sha256=_iBos3F_bhEOdjOnzeiEYSrCucasc810xXtLBXI8cQc,17
123
+ maleo_foundation-0.2.43.dist-info/RECORD,,