maleo-foundation 0.2.9__py3-none-any.whl → 0.2.10__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.
@@ -1,8 +1,8 @@
1
- from fastapi import Security
2
- from fastapi.security import HTTPAuthorizationCredentials, HTTPBearer
3
- from pydantic import BaseModel
1
+ from fastapi.security import HTTPBearer
2
+ from pydantic import BaseModel, Field
4
3
 
5
4
  TOKEN_SCHEME = HTTPBearer()
6
5
 
7
6
  class Authorization(BaseModel):
8
- token:HTTPAuthorizationCredentials = Security(TOKEN_SCHEME)
7
+ scheme:str = Field(..., description="Authorization's scheme")
8
+ credentials:str = Field(..., description="Authorization's credentials")
@@ -27,7 +27,7 @@ class MaleoFoundationTokenGeneralTransfers:
27
27
 
28
28
  class EncodePayload(DecodePayload):
29
29
  iat_dt:datetime = Field(datetime.now(timezone.utc), description="Issued at (datetime)")
30
- exp_in:int = Field(15, ge=5, description="Expires in (integer, minutes)", exclude=True)
30
+ exp_in:int = Field(15, ge=1, description="Expires in (integer, minutes)", exclude=True)
31
31
 
32
32
  @model_validator(mode="before")
33
33
  @classmethod
@@ -11,4 +11,4 @@ class AuthDependencies:
11
11
 
12
12
  @staticmethod
13
13
  def authorization(token:HTTPAuthorizationCredentials = Security(TOKEN_SCHEME)) -> Authorization:
14
- return Authorization(token=token)
14
+ return Authorization(scheme=token.scheme, credentials=token.credentials)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: maleo_foundation
3
- Version: 0.2.9
3
+ Version: 0.2.10
4
4
  Summary: Foundation package for Maleo
5
5
  Author-email: Agra Bima Yuda <agra@nexmedis.com>
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  maleo_foundation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  maleo_foundation/authentication.py,sha256=kJfuRKgQY5cjmn0r36z4a4jF4bg7UifZ9D9mgMMnTsw,1840
3
- maleo_foundation/authorization.py,sha256=jTacP6xqs6zfzn7xeAD4MnLnyNvzvUQYSmoTnLD5I7s,255
3
+ maleo_foundation/authorization.py,sha256=euq24UEhTaimmM24Ies-kZF1zqVwM_x0Zox_6k7zyqI,281
4
4
  maleo_foundation/constants.py,sha256=aBmEfWlBqZxi0k-n6h2NM1YRLOjMnheEiLyQcjP-zCQ,1164
5
5
  maleo_foundation/enums.py,sha256=uvwl3dl2r6BoJMEbtSETiLoyJubHup9Lc7VOg7w7zQo,2943
6
6
  maleo_foundation/extended_types.py,sha256=pIKt-_9tby4rmune3fmWcCW_mohaNRh_1lywBmdc-L4,301
@@ -60,7 +60,7 @@ maleo_foundation/models/transfers/__init__.py,sha256=oJLJ3Geeme6vBw7R2Dhvdvg4ziV
60
60
  maleo_foundation/models/transfers/general/__init__.py,sha256=UPIE9l9XXCb6nWzaV3atMgbbCeBeRzsvFyROJuH2d2w,168
61
61
  maleo_foundation/models/transfers/general/key.py,sha256=tLKkXbwNu7Oc1MdKa8-Y7TlBAIk54h_02AmL5Yg2PrQ,751
62
62
  maleo_foundation/models/transfers/general/signature.py,sha256=J9xQy2HjpCQOnES7RJqsUnDgjFPuakQ1mxyfdTdstSE,297
63
- maleo_foundation/models/transfers/general/token.py,sha256=77V2YBB-zQppIxFxxrtbHprGzBvGWbXv2Ie72NaoF60,2698
63
+ maleo_foundation/models/transfers/general/token.py,sha256=QckgF39hRAFU9GNXZsQ20kfaGom5Ppw5ShYaqDbeje8,2698
64
64
  maleo_foundation/models/transfers/parameters/__init__.py,sha256=oKW4RPIEISISRjsJzD8lsCGY1HhZRTzshPpWHcJu86k,353
65
65
  maleo_foundation/models/transfers/parameters/client.py,sha256=tn_Hwa-k-Utp5rODe7GylqZB8djIKKupgkUFscYCyLc,4059
66
66
  maleo_foundation/models/transfers/parameters/general.py,sha256=WoekZJCIoAllhXdRIJkNRdNq0QEIn0bteiHJLtzkCxU,579
@@ -100,7 +100,7 @@ maleo_foundation/utils/logging.py,sha256=W5Fhk_xAXVqSujaY8mv3hRH4wlQSpUn4ReuMoiK
100
100
  maleo_foundation/utils/mergers.py,sha256=DniUu3Ot4qkYH_YSw4uD1cn9cfirum4S_Opp8fMkQwA,702
101
101
  maleo_foundation/utils/query.py,sha256=ODQ3adOYQNj5E2cRW9ytbjBz56nEDcnfq8mQ6YZbCCM,4375
102
102
  maleo_foundation/utils/dependencies/__init__.py,sha256=0KKGrdfj8Cc5A4SRk_ZBAxzOP795Mizdb4zIBh07KC4,122
103
- maleo_foundation/utils/dependencies/auth.py,sha256=E5DfxX7iN-R1vG1lAB9m_U1R52wcBhpVWknPEnZEM8Y,592
103
+ maleo_foundation/utils/dependencies/auth.py,sha256=sZgW1VPmUfpGTS7522qlAXPz_86ZPnuBZvzulT0IlQw,631
104
104
  maleo_foundation/utils/formatter/__init__.py,sha256=iKf5YCbEdg1qKnFHyKqqcQbqAqEeRUf8mhI3v3dQoj8,78
105
105
  maleo_foundation/utils/formatter/case.py,sha256=TmvvlfzGdC_omMTB5vAa40TZBxQ3hnr-SYeo0M52Rlg,1352
106
106
  maleo_foundation/utils/loaders/__init__.py,sha256=P_3ycGfeDXFjAi8bE4iLWHxBveqUIdpHgGv-klRWM3s,282
@@ -110,7 +110,7 @@ maleo_foundation/utils/loaders/credential/__init__.py,sha256=qopTKvcMVoTFwyRijeg
110
110
  maleo_foundation/utils/loaders/credential/google.py,sha256=deksZXT5wPhEsSMHbZ3x05WHXxCjLDt76Ns-1Tmhp7g,948
111
111
  maleo_foundation/utils/loaders/key/__init__.py,sha256=hVygcC2ImHc_aVrSrOmyedR8tMUZokWUKCKOSh5ctbo,106
112
112
  maleo_foundation/utils/loaders/key/rsa.py,sha256=gDhyX6iTFtHiluuhFCozaZ3pOLKU2Y9TlrNMK_GVyGU,3796
113
- maleo_foundation-0.2.9.dist-info/METADATA,sha256=6NtW8gRCicNq9xqXcJ_IRipxUY6cr85L7-Lq6ioRkxw,3418
114
- maleo_foundation-0.2.9.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
115
- maleo_foundation-0.2.9.dist-info/top_level.txt,sha256=_iBos3F_bhEOdjOnzeiEYSrCucasc810xXtLBXI8cQc,17
116
- maleo_foundation-0.2.9.dist-info/RECORD,,
113
+ maleo_foundation-0.2.10.dist-info/METADATA,sha256=qe6cdo5afdbsaWdCmuED0l-e3RBY5656mbIKOOouZLE,3419
114
+ maleo_foundation-0.2.10.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
115
+ maleo_foundation-0.2.10.dist-info/top_level.txt,sha256=_iBos3F_bhEOdjOnzeiEYSrCucasc810xXtLBXI8cQc,17
116
+ maleo_foundation-0.2.10.dist-info/RECORD,,