lsrestclient 1.3.1__py3-none-any.whl → 1.3.2__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.
- lsrestclient/auth.py +6 -2
- {lsrestclient-1.3.1.dist-info → lsrestclient-1.3.2.dist-info}/METADATA +1 -1
- {lsrestclient-1.3.1.dist-info → lsrestclient-1.3.2.dist-info}/RECORD +5 -5
- {lsrestclient-1.3.1.dist-info → lsrestclient-1.3.2.dist-info}/WHEEL +0 -0
- {lsrestclient-1.3.1.dist-info → lsrestclient-1.3.2.dist-info}/entry_points.txt +0 -0
lsrestclient/auth.py
CHANGED
@@ -1,10 +1,14 @@
|
|
1
1
|
from lsrestclient import LsRestClient, DownStreamError
|
2
2
|
|
3
3
|
|
4
|
-
def
|
4
|
+
def auth_am_login(**kwargs) -> str:
|
5
5
|
am = LsRestClient.from_env("AM_BASE_URL", "am", True)
|
6
|
-
r = am.post("/auth/login", body=
|
6
|
+
r = am.post("/auth/login", body=kwargs)
|
7
7
|
if r.status_code == 200:
|
8
8
|
return r.json().get("access_token")
|
9
9
|
else:
|
10
10
|
raise DownStreamError("/auth/login", r.status_code, r.content)
|
11
|
+
|
12
|
+
|
13
|
+
def auth_am_login_apikey(org_id: str, api_key: str) -> str:
|
14
|
+
return auth_am_login(ORG_ID=org_id, API_KEY=api_key)
|
@@ -1,5 +1,5 @@
|
|
1
1
|
lsrestclient/__init__.py,sha256=lI62SHmG0m-iukB5UEwdN5dO4cKnDasOt-TmR1rgaWI,72
|
2
|
-
lsrestclient/auth.py,sha256
|
2
|
+
lsrestclient/auth.py,sha256=n9f5GkKDbzin2jHNv9D7QBb6ZLEjamfbkzzlGpNdjLE,468
|
3
3
|
lsrestclient/client.py,sha256=cQXgRZ7oktHR7u8i9sib9FhBV5JxdmA-QOz6UGkYzUc,9922
|
4
4
|
lsrestclient/contexts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
5
5
|
lsrestclient/contexts/bearer_token.py,sha256=GZZOzAI2Ng_9DvFCbhv1Wwb8wJ1AYCca3fQeNtt2NaU,753
|
@@ -7,7 +7,7 @@ lsrestclient/exceptions.py,sha256=Ze_UZutdTxmKXq8brvciZclUIkEGpmFrybPzk6TVk4Q,21
|
|
7
7
|
lsrestclient/fixtures.py,sha256=dFkAYQXL6xqTOwRofb03Nsu_cIjq1sG10Rh8dxWfz9s,239
|
8
8
|
lsrestclient/mock.py,sha256=YanA_CQdaIMd99VkHaWDv3ro59fjBJsNUTZb14rC5aE,1213
|
9
9
|
lsrestclient/response.py,sha256=IXjIgb7ySF-1FdAtnOKRyF3k9LJRB3OFyzIIZI1GNxM,1816
|
10
|
-
lsrestclient-1.3.
|
11
|
-
lsrestclient-1.3.
|
12
|
-
lsrestclient-1.3.
|
13
|
-
lsrestclient-1.3.
|
10
|
+
lsrestclient-1.3.2.dist-info/METADATA,sha256=x5C7teRjs6eW2uHkRrCQjySg9Db1KIeS1dQmB7y88Dc,6656
|
11
|
+
lsrestclient-1.3.2.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
|
12
|
+
lsrestclient-1.3.2.dist-info/entry_points.txt,sha256=7lN1XN3lq5Jv5PlpOdIlFrLlFlwzE5MaEWSgMhKASOM,47
|
13
|
+
lsrestclient-1.3.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|