lsrestclient 1.3.1__tar.gz → 1.3.2__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {lsrestclient-1.3.1 → lsrestclient-1.3.2}/PKG-INFO +1 -1
- {lsrestclient-1.3.1 → lsrestclient-1.3.2}/lsrestclient/auth.py +6 -2
- {lsrestclient-1.3.1 → lsrestclient-1.3.2}/pyproject.toml +1 -1
- {lsrestclient-1.3.1 → lsrestclient-1.3.2}/README.md +0 -0
- {lsrestclient-1.3.1 → lsrestclient-1.3.2}/lsrestclient/__init__.py +0 -0
- {lsrestclient-1.3.1 → lsrestclient-1.3.2}/lsrestclient/client.py +0 -0
- {lsrestclient-1.3.1 → lsrestclient-1.3.2}/lsrestclient/contexts/__init__.py +0 -0
- {lsrestclient-1.3.1 → lsrestclient-1.3.2}/lsrestclient/contexts/bearer_token.py +0 -0
- {lsrestclient-1.3.1 → lsrestclient-1.3.2}/lsrestclient/exceptions.py +0 -0
- {lsrestclient-1.3.1 → lsrestclient-1.3.2}/lsrestclient/fixtures.py +0 -0
- {lsrestclient-1.3.1 → lsrestclient-1.3.2}/lsrestclient/mock.py +0 -0
- {lsrestclient-1.3.1 → lsrestclient-1.3.2}/lsrestclient/response.py +0 -0
@@ -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)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|