lsrestclient 1.3.1__py3-none-any.whl → 1.3.2__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
lsrestclient/auth.py CHANGED
@@ -1,10 +1,14 @@
1
1
  from lsrestclient import LsRestClient, DownStreamError
2
2
 
3
3
 
4
- def auth_am_login_apikey(org_id: str, api_key: str) -> str:
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=dict(ORG_ID=org_id, API_KEY=api_key))
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,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lsrestclient
3
- Version: 1.3.1
3
+ Version: 1.3.2
4
4
  Summary: REST Api Client
5
5
  Author: mba
6
6
  Author-email: bartel@electronic-shop.lu
@@ -1,5 +1,5 @@
1
1
  lsrestclient/__init__.py,sha256=lI62SHmG0m-iukB5UEwdN5dO4cKnDasOt-TmR1rgaWI,72
2
- lsrestclient/auth.py,sha256=-XT9OajBudLDZJ7tZyM0E5EXF2R1Kc-jyeKMf24wyJA,403
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.1.dist-info/METADATA,sha256=hWASGIcQafe-7HbF_PaRPPydcHd-JYWZ0cNHg5JwagE,6656
11
- lsrestclient-1.3.1.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
12
- lsrestclient-1.3.1.dist-info/entry_points.txt,sha256=7lN1XN3lq5Jv5PlpOdIlFrLlFlwzE5MaEWSgMhKASOM,47
13
- lsrestclient-1.3.1.dist-info/RECORD,,
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,,