mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 20:27:12 +00:00
Add new token
This commit is contained in:
@@ -43,6 +43,15 @@ def bootstrap_infisical(context: Context):
|
|||||||
body = resp.json()
|
body = resp.json()
|
||||||
org = body["organization"]
|
org = body["organization"]
|
||||||
user = body["user"]
|
user = body["user"]
|
||||||
|
temp_token = body["token"]
|
||||||
|
|
||||||
|
resp = client.post(
|
||||||
|
"/api/v1/auth/token",
|
||||||
|
headers={"Authorization": f"Bearer {temp_token}"},
|
||||||
|
json={},
|
||||||
|
)
|
||||||
|
resp.raise_for_status()
|
||||||
|
body = resp.json()
|
||||||
auth_token = body["token"]
|
auth_token = body["token"]
|
||||||
headers = dict(authorization=f"Bearer {auth_token}")
|
headers = dict(authorization=f"Bearer {auth_token}")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user