infisicalsdk 1.0.9__py3-none-any.whl → 1.0.11__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.
Potentially problematic release.
This version of infisicalsdk might be problematic. Click here for more details.
- infisical_sdk/resources/auth.py +3 -2
- infisical_sdk/resources/auth_methods/__init__.py +1 -0
- infisical_sdk/resources/auth_methods/oidc_auth.py +36 -0
- {infisicalsdk-1.0.9.dist-info → infisicalsdk-1.0.11.dist-info}/METADATA +5 -4
- {infisicalsdk-1.0.9.dist-info → infisicalsdk-1.0.11.dist-info}/RECORD +7 -6
- {infisicalsdk-1.0.9.dist-info → infisicalsdk-1.0.11.dist-info}/WHEEL +0 -0
- {infisicalsdk-1.0.9.dist-info → infisicalsdk-1.0.11.dist-info}/top_level.txt +0 -0
infisical_sdk/resources/auth.py
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
from infisical_sdk.infisical_requests import InfisicalRequests
|
|
2
2
|
from infisical_sdk.resources.auth_methods import AWSAuth
|
|
3
3
|
from infisical_sdk.resources.auth_methods import UniversalAuth
|
|
4
|
-
|
|
4
|
+
from infisical_sdk.resources.auth_methods import OidcAuth
|
|
5
5
|
from typing import Callable
|
|
6
6
|
class Auth:
|
|
7
7
|
def __init__(self, requests: InfisicalRequests, setToken: Callable[[str], None]):
|
|
8
8
|
self.requests = requests
|
|
9
9
|
self.aws_auth = AWSAuth(requests, setToken)
|
|
10
|
-
self.universal_auth = UniversalAuth(requests, setToken)
|
|
10
|
+
self.universal_auth = UniversalAuth(requests, setToken)
|
|
11
|
+
self.oidc_auth = OidcAuth(requests, setToken)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
from infisical_sdk.api_types import MachineIdentityLoginResponse
|
|
2
|
+
|
|
3
|
+
from typing import Callable
|
|
4
|
+
from infisical_sdk.infisical_requests import InfisicalRequests
|
|
5
|
+
|
|
6
|
+
class OidcAuth:
|
|
7
|
+
def __init__(self, requests: InfisicalRequests, setToken: Callable[[str], None]):
|
|
8
|
+
self.requests = requests
|
|
9
|
+
self.setToken = setToken
|
|
10
|
+
|
|
11
|
+
def login(self, identity_id: str, jwt: str) -> MachineIdentityLoginResponse:
|
|
12
|
+
"""
|
|
13
|
+
Login with OIDC Auth.
|
|
14
|
+
|
|
15
|
+
Args:
|
|
16
|
+
identity_id (str): Your Machine Identity ID.
|
|
17
|
+
jwt (str): Your OIDC JWT.
|
|
18
|
+
|
|
19
|
+
Returns:
|
|
20
|
+
MachineIdentityLoginResponse: A response object containing the access token and related information.
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
requestBody = {
|
|
24
|
+
"identityId": identity_id,
|
|
25
|
+
"jwt": jwt
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
result = self.requests.post(
|
|
29
|
+
path="/api/v1/auth/oidc-auth/login",
|
|
30
|
+
json=requestBody,
|
|
31
|
+
model=MachineIdentityLoginResponse
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
self.setToken(result.data.accessToken)
|
|
35
|
+
|
|
36
|
+
return result.data
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: infisicalsdk
|
|
3
|
-
Version: 1.0.
|
|
4
|
-
Summary: Infisical
|
|
3
|
+
Version: 1.0.11
|
|
4
|
+
Summary: Official Infisical SDK for Python (Latest)
|
|
5
5
|
Home-page: https://github.com/Infisical/python-sdk-official
|
|
6
6
|
Author: Infisical
|
|
7
7
|
Author-email: support@infisical.com
|
|
8
|
-
Keywords: Infisical,Infisical API,Infisical SDK
|
|
8
|
+
Keywords: Infisical,Infisical API,Infisical SDK,SDK,Secrets Management
|
|
9
9
|
Description-Content-Type: text/markdown
|
|
10
10
|
Requires-Dist: python-dateutil
|
|
11
11
|
Requires-Dist: aenum
|
|
@@ -21,5 +21,6 @@ Dynamic: keywords
|
|
|
21
21
|
Dynamic: requires-dist
|
|
22
22
|
Dynamic: summary
|
|
23
23
|
|
|
24
|
-
Infisical SDK
|
|
24
|
+
The official Infisical SDK for Python.
|
|
25
|
+
Documentation can be found at https://github.com/Infisical/python-sdk-official
|
|
25
26
|
|
|
@@ -3,15 +3,16 @@ infisical_sdk/api_types.py,sha256=-SFKKhDx0GZGlzZ0kysvEMmBRtbQQXl5vwaH1a4m1Ac,51
|
|
|
3
3
|
infisical_sdk/client.py,sha256=8ElPok-Ao54NgX1bQtWX7ccM7UTvVhXoaWan1iRwc9k,1505
|
|
4
4
|
infisical_sdk/infisical_requests.py,sha256=v6GMakywaHbiGV2aZ4oiDsDukHt50PhA1J2xAgNGxMk,7666
|
|
5
5
|
infisical_sdk/resources/__init__.py,sha256=oq3gcsEqybe0O44wPyoaiRj3TrzaP4X5APJeI4ltPwo,77
|
|
6
|
-
infisical_sdk/resources/auth.py,sha256=
|
|
6
|
+
infisical_sdk/resources/auth.py,sha256=YXzWbrH4ibIXwfqTy453dmqX7PpowbLukok0Yl7jaKg,569
|
|
7
7
|
infisical_sdk/resources/kms.py,sha256=4nTXDo3qW5Qk1o1M4K8UG98fgxHoEGm0QkOEUv2SuTc,4712
|
|
8
8
|
infisical_sdk/resources/secrets.py,sha256=KJyBbPLxZRs5S6Ig6CbuDLAI07eO1OFbaB5WXrQoFVI,9219
|
|
9
|
-
infisical_sdk/resources/auth_methods/__init__.py,sha256=
|
|
9
|
+
infisical_sdk/resources/auth_methods/__init__.py,sha256=DHsGPBvdUvifNbwEIVyW7YQSVv0KJIcwpG78xXuJxZk,104
|
|
10
10
|
infisical_sdk/resources/auth_methods/aws_auth.py,sha256=NviQc9mE0zculm8Tj-4n38-hJXKjBx65xrKCsDgMYyA,4545
|
|
11
|
+
infisical_sdk/resources/auth_methods/oidc_auth.py,sha256=5X8md8VgYGaC-5jLh22eTnAuSE9HppqtaREvmHYP15g,1043
|
|
11
12
|
infisical_sdk/resources/auth_methods/universal_auth.py,sha256=K5u25c344y82RZatjnDEf619XiiGQBgUS-Aia041hZE,1088
|
|
12
13
|
infisical_sdk/util/__init__.py,sha256=nPGrsq3vGWfwakfvSs7tzOfztXY16DS5GahTiyrC8tE,39
|
|
13
14
|
infisical_sdk/util/secrets_cache.py,sha256=LmgxFZEy8194xe4YhA958BJQdcV0Fv2Xmhfc7bwvBfQ,3175
|
|
14
|
-
infisicalsdk-1.0.
|
|
15
|
-
infisicalsdk-1.0.
|
|
16
|
-
infisicalsdk-1.0.
|
|
17
|
-
infisicalsdk-1.0.
|
|
15
|
+
infisicalsdk-1.0.11.dist-info/METADATA,sha256=FuloSKHIMdmrnFvGfkCm9RWb4pD3M2st8cJAAzTFBHc,775
|
|
16
|
+
infisicalsdk-1.0.11.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
17
|
+
infisicalsdk-1.0.11.dist-info/top_level.txt,sha256=FvJjMGD1FvxwipO_qFajdH20yNV8n3lJ7G3DkQoPJNU,14
|
|
18
|
+
infisicalsdk-1.0.11.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|