maleo-foundation 0.2.1__py3-none-any.whl → 0.2.3__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.
- maleo_foundation/client/services/token.py +1 -1
- maleo_foundation/managers/service.py +2 -3
- maleo_foundation/models/transfers/general/token.py +2 -3
- {maleo_foundation-0.2.1.dist-info → maleo_foundation-0.2.3.dist-info}/METADATA +1 -1
- {maleo_foundation-0.2.1.dist-info → maleo_foundation-0.2.3.dist-info}/RECORD +7 -7
- {maleo_foundation-0.2.1.dist-info → maleo_foundation-0.2.3.dist-info}/WHEEL +0 -0
- {maleo_foundation-0.2.1.dist-info → maleo_foundation-0.2.3.dist-info}/top_level.txt +0 -0
@@ -30,7 +30,7 @@ class MaleoFoundationTokenClientService(ClientService):
|
|
30
30
|
description = "Unexpected error occured while trying to import key"
|
31
31
|
other = "Ensure given key is valid"
|
32
32
|
return MaleoFoundationTokenResultsTransfers.Fail(message=message, description=description, other=other)
|
33
|
-
payload = MaleoFoundationTokenGeneralTransfers.EncodePayload.model_validate(parameters.payload.model_dump()).model_dump(mode="json")
|
33
|
+
payload = MaleoFoundationTokenGeneralTransfers.EncodePayload.model_validate(parameters.payload.model_dump()).model_dump(mode="json", exclude_none=True)
|
34
34
|
token = jwt.encode(payload=payload, key=private_key.export_key(), algorithm="RS256")
|
35
35
|
data = MaleoFoundationTokenSchemas.Token(token=token)
|
36
36
|
return MaleoFoundationTokenResultsTransfers.Encode(data=data)
|
@@ -261,10 +261,9 @@ class ServiceManager:
|
|
261
261
|
@property
|
262
262
|
def token(self) -> str:
|
263
263
|
payload = MaleoFoundationTokenGeneralTransfers.BaseEncodePayload(
|
264
|
-
iss=
|
265
|
-
sub=
|
264
|
+
iss=None,
|
265
|
+
sub=None,
|
266
266
|
sr="administrator",
|
267
|
-
u_i=0,
|
268
267
|
u_u=self._maleo_credentials.username,
|
269
268
|
u_e=self._maleo_credentials.email,
|
270
269
|
u_ut="service"
|
@@ -6,10 +6,9 @@ from maleo_foundation.models.schemas.token import MaleoFoundationTokenSchemas
|
|
6
6
|
|
7
7
|
class MaleoFoundationTokenGeneralTransfers:
|
8
8
|
class BasePayload(BaseModel):
|
9
|
-
iss:
|
10
|
-
sub:
|
9
|
+
iss:BaseTypes.OptionalString = Field(None, description="Token's issuer")
|
10
|
+
sub:BaseTypes.OptionalString = Field(None, description="Token's subject")
|
11
11
|
sr:str = Field(..., description="System role")
|
12
|
-
u_i:int = Field(..., description="user's ID")
|
13
12
|
u_u:str = Field(..., description="user's username")
|
14
13
|
u_e:str = Field(..., description="user's email")
|
15
14
|
u_ut:str = Field(..., description="user's type")
|
@@ -9,7 +9,7 @@ maleo_foundation/client/manager.py,sha256=pFWLFYW4eE9MLyFmFS05IgnMBdqqUHbdyTkSbn
|
|
9
9
|
maleo_foundation/client/services/__init__.py,sha256=uIBnAeQ9a2otQbUAbKBQfYrkEUugXjxXoV8W5QYHuic,1051
|
10
10
|
maleo_foundation/client/services/key.py,sha256=Av8OFEJO8-Chlu-lRzR4or1qkJ0ahxtiHwkqF4ktDD4,5537
|
11
11
|
maleo_foundation/client/services/signature.py,sha256=brEnNPrkeChx0niDgAYCI2HeANQGHpPI6a0lARGCbZ4,4498
|
12
|
-
maleo_foundation/client/services/token.py,sha256=
|
12
|
+
maleo_foundation/client/services/token.py,sha256=6kQTDsL1XbA-kyxIW4EySoJf8ORAQtjvQSNrZPIf5eA,4119
|
13
13
|
maleo_foundation/client/services/encryption/__init__.py,sha256=qK9-RwivJ2xkMIwXI8XM8LmYboRTX6R3G9Nh3RxSdCM,594
|
14
14
|
maleo_foundation/client/services/encryption/aes.py,sha256=RXsKqza-gETqHhTmULgldYf51_E6KtbTxhtTQroP4jI,3456
|
15
15
|
maleo_foundation/client/services/encryption/rsa.py,sha256=pof7uYc9jkLLTrwfoWrkbLNByZW8jYwAbFF5h0nVgfM,4704
|
@@ -32,7 +32,7 @@ maleo_foundation/expanded_types/encryption/rsa.py,sha256=MuhB_DGrjnsl4t96W4pKuCt
|
|
32
32
|
maleo_foundation/managers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
33
33
|
maleo_foundation/managers/db.py,sha256=Pn5EZ-c1Hy6-BihN7KokHJWmBIt3Ty96fZ0zF-srtF4,5208
|
34
34
|
maleo_foundation/managers/middleware.py,sha256=ODIQU1Hpu-Xempjjo_VRbVtxiD5oi74mNuoWuDawRh0,4250
|
35
|
-
maleo_foundation/managers/service.py,sha256=
|
35
|
+
maleo_foundation/managers/service.py,sha256=B2wPRfqPyaZBHiRa5zv5PhxzHZpmWdCEM_Kvgjejxmc,16001
|
36
36
|
maleo_foundation/managers/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
37
37
|
maleo_foundation/managers/client/base.py,sha256=5z9l2GN4QASF0-Lft8o5QQ3SRPXqeNZNT1S1CgaE764,4384
|
38
38
|
maleo_foundation/managers/client/maleo.py,sha256=iCM47TLL-RSQ2FkTmHVPdsb2JCd1LebMx6OJvIr4vCQ,2035
|
@@ -59,7 +59,7 @@ maleo_foundation/models/transfers/__init__.py,sha256=oJLJ3Geeme6vBw7R2Dhvdvg4ziV
|
|
59
59
|
maleo_foundation/models/transfers/general/__init__.py,sha256=UPIE9l9XXCb6nWzaV3atMgbbCeBeRzsvFyROJuH2d2w,168
|
60
60
|
maleo_foundation/models/transfers/general/key.py,sha256=tLKkXbwNu7Oc1MdKa8-Y7TlBAIk54h_02AmL5Yg2PrQ,751
|
61
61
|
maleo_foundation/models/transfers/general/signature.py,sha256=J9xQy2HjpCQOnES7RJqsUnDgjFPuakQ1mxyfdTdstSE,297
|
62
|
-
maleo_foundation/models/transfers/general/token.py,sha256=
|
62
|
+
maleo_foundation/models/transfers/general/token.py,sha256=yj5wM9Wvc0BqyRRDtKiyaaLv-JQf51IIA604JWj-Cqw,2697
|
63
63
|
maleo_foundation/models/transfers/parameters/__init__.py,sha256=oKW4RPIEISISRjsJzD8lsCGY1HhZRTzshPpWHcJu86k,353
|
64
64
|
maleo_foundation/models/transfers/parameters/client.py,sha256=tn_Hwa-k-Utp5rODe7GylqZB8djIKKupgkUFscYCyLc,4059
|
65
65
|
maleo_foundation/models/transfers/parameters/general.py,sha256=WoekZJCIoAllhXdRIJkNRdNq0QEIn0bteiHJLtzkCxU,579
|
@@ -107,7 +107,7 @@ maleo_foundation/utils/loaders/credential/__init__.py,sha256=qopTKvcMVoTFwyRijeg
|
|
107
107
|
maleo_foundation/utils/loaders/credential/google.py,sha256=deksZXT5wPhEsSMHbZ3x05WHXxCjLDt76Ns-1Tmhp7g,948
|
108
108
|
maleo_foundation/utils/loaders/key/__init__.py,sha256=hVygcC2ImHc_aVrSrOmyedR8tMUZokWUKCKOSh5ctbo,106
|
109
109
|
maleo_foundation/utils/loaders/key/rsa.py,sha256=gDhyX6iTFtHiluuhFCozaZ3pOLKU2Y9TlrNMK_GVyGU,3796
|
110
|
-
maleo_foundation-0.2.
|
111
|
-
maleo_foundation-0.2.
|
112
|
-
maleo_foundation-0.2.
|
113
|
-
maleo_foundation-0.2.
|
110
|
+
maleo_foundation-0.2.3.dist-info/METADATA,sha256=jy6MN-Z2m-UMu6siPDessr81cXuXwfSuXTATJQVqHik,3418
|
111
|
+
maleo_foundation-0.2.3.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
|
112
|
+
maleo_foundation-0.2.3.dist-info/top_level.txt,sha256=_iBos3F_bhEOdjOnzeiEYSrCucasc810xXtLBXI8cQc,17
|
113
|
+
maleo_foundation-0.2.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|