infisicalsdk 1.0.9__py3-none-any.whl → 1.0.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.

Potentially problematic release.


This version of infisicalsdk might be problematic. Click here for more details.

@@ -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)
@@ -1,2 +1,3 @@
1
1
  from .aws_auth import AWSAuth
2
2
  from .universal_auth import UniversalAuth
3
+ from .oidc_auth import OidcAuth
@@ -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,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: infisicalsdk
3
- Version: 1.0.9
3
+ Version: 1.0.10
4
4
  Summary: Infisical API Client
5
5
  Home-page: https://github.com/Infisical/python-sdk-official
6
6
  Author: Infisical
@@ -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=7Wn6uj4idAvwNsStT0ihk-vts6--Rd17lhh6nLtUBK8,458
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=bpdwKQ_ZxAdf6yzImWlKy1ZhkJxWrSWb0IgcuUF0DEU,72
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.9.dist-info/METADATA,sha256=daLY-6xVigluHbRlnU5dvpQXO4j6X5uE6_bHl7M6riA,725
15
- infisicalsdk-1.0.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
16
- infisicalsdk-1.0.9.dist-info/top_level.txt,sha256=FvJjMGD1FvxwipO_qFajdH20yNV8n3lJ7G3DkQoPJNU,14
17
- infisicalsdk-1.0.9.dist-info/RECORD,,
15
+ infisicalsdk-1.0.10.dist-info/METADATA,sha256=oDjywjEWyZ2WM3Tv80iWbBbN7YAPXlm3ko1zFq0QzZE,726
16
+ infisicalsdk-1.0.10.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
17
+ infisicalsdk-1.0.10.dist-info/top_level.txt,sha256=FvJjMGD1FvxwipO_qFajdH20yNV8n3lJ7G3DkQoPJNU,14
18
+ infisicalsdk-1.0.10.dist-info/RECORD,,