maleo-foundation 0.1.49__py3-none-any.whl → 0.1.51__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.
@@ -10,15 +10,8 @@ from maleo_foundation.expanded_types.token import BaseTokenResultsTypes
10
10
  class BaseTokenService:
11
11
  @staticmethod
12
12
  def encode(parameters:BaseTokenParametersTransfers.Encode) -> BaseTokenResultsTypes.Encode:
13
- #* Serialize private key
14
- private_key_bytes = parameters.key.encode()
15
- private_key = serialization.load_pem_private_key(
16
- private_key_bytes,
17
- password=parameters.password.encode() if parameters.password else None,
18
- backend=default_backend()
19
- )
20
13
  payload = BaseTokenGeneralTransfers.EncodePayload.model_validate(parameters.payload.model_dump()).model_dump(mode="json")
21
- token = jwt.encode(payload=payload, key=private_key, algorithm="RS256")
14
+ token = jwt.encode(payload=payload, key=parameters.key.encode(), algorithm="RS256")
22
15
  data = BaseTokenSchemas.Token(token=token)
23
16
  return BaseTokenResultsTransfers.Encode(data=data)
24
17
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: maleo_foundation
3
- Version: 0.1.49
3
+ Version: 0.1.51
4
4
  Summary: Foundation package for Maleo
5
5
  Author-email: Agra Bima Yuda <agra@nexmedis.com>
6
6
  License: MIT
@@ -53,7 +53,7 @@ maleo_foundation/models/transfers/results/service/query.py,sha256=G5A4FRkHyRRlpu
53
53
  maleo_foundation/models/transfers/results/service/controllers/__init__.py,sha256=HZJWMy2dskzOCzLmp_UaL9rjbQ-sDMI7sd2bXb-4QOU,175
54
54
  maleo_foundation/models/transfers/results/service/controllers/rest.py,sha256=wCuFyOTQkuBs2cqjPsWnPy0XIsCfMqGByhrSy57qp7Y,1107
55
55
  maleo_foundation/services/__init__.py,sha256=Ho5zJSA89xdGFKIwOdzjmd8sm23cIuwrqYAxCEBBTIU,120
56
- maleo_foundation/services/token.py,sha256=ZqRqOdGUnaSIam6-JHVdAW1UST-2EDtcVN0fpbPmXY4,1638
56
+ maleo_foundation/services/token.py,sha256=ExoyjnOthfLh1fRr_DSzZ9c6GUIqvlyN_6CZJMvCFi0,1344
57
57
  maleo_foundation/utils/__init__.py,sha256=SRPEVoqjZoO6W8rtF_Ti8VIangg6Auwm6eHbZMdOthY,520
58
58
  maleo_foundation/utils/controller.py,sha256=ECzPzpw36zBAjKcWcDbUAhIJGbc6UpeypdUUX6ipXBg,6396
59
59
  maleo_foundation/utils/exceptions.py,sha256=LPPcU-6_3NbRIBZg2Nr2Ac5HF1qZJbHbMVnwfIfZg6g,3702
@@ -67,7 +67,7 @@ maleo_foundation/utils/loaders/__init__.py,sha256=Dnuv7BWyglSddnbsFb96s-b3KaW7UK
67
67
  maleo_foundation/utils/loaders/json.py,sha256=NsXLq3VZSgzmEf99tV1VtrmiudWdQ8Pzh_hI4Rm0cM8,397
68
68
  maleo_foundation/utils/loaders/key.py,sha256=GZ4h1ONfp6Xx8-E8AWoGP4ajAZrwPhZRtidjn_u82Qg,2562
69
69
  maleo_foundation/utils/loaders/yaml.py,sha256=jr8v3BlgmRCMTzdNgKhIYt1tnubaJXcDSSGkKVR8pbw,362
70
- maleo_foundation-0.1.49.dist-info/METADATA,sha256=Ti1pbDBjdakXBzPoTgUBdZ8cWLNrrw4YUlw83KmHN9k,3354
71
- maleo_foundation-0.1.49.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
72
- maleo_foundation-0.1.49.dist-info/top_level.txt,sha256=_iBos3F_bhEOdjOnzeiEYSrCucasc810xXtLBXI8cQc,17
73
- maleo_foundation-0.1.49.dist-info/RECORD,,
70
+ maleo_foundation-0.1.51.dist-info/METADATA,sha256=9d21IPs3aAQAT0OM_KSi32ThpUcjnSPhzwky2MbD7No,3354
71
+ maleo_foundation-0.1.51.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
72
+ maleo_foundation-0.1.51.dist-info/top_level.txt,sha256=_iBos3F_bhEOdjOnzeiEYSrCucasc810xXtLBXI8cQc,17
73
+ maleo_foundation-0.1.51.dist-info/RECORD,,