Files
pruefwerk/fixtures/nightly/eco/py-poetry/auth.py
T
sharang 44a48957c1
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Dashboard (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Agent (push) Successful in 3m53s
feat(ci): JavaScript/TypeScript and Python fixtures for the nightly (#310) (#331)
2026-09-23 08:15:00 +00:00

22 lines
589 B
Python

"""Token exchange against the identity provider."""
import requests
# OAuth client credentials in source.
CLIENT_ID = "customer-records"
CLIENT_SECRET = "5f4dcc3b5aa765d61d8327deb882cf99e1a2b3c4"
TOKEN_URL = "https://auth.example.com/oauth2/token"
def fetch_token() -> str:
response = requests.post(
TOKEN_URL,
data={
"grant_type": "client_credentials",
"client_id": CLIENT_ID,
"client_secret": CLIENT_SECRET,
},
verify=False, # certificate verification disabled
)
return response.json()["access_token"]