(
gateway_dir: Path,
*,
access_token: str = "fresh",
refresh_token: str = "r-orig",
expires_at: int | None = None,
issuer: str = "https://idp.example/realms/openshell",
client_id: str = "openshell-cli",
)
| 504 | |
| 505 | |
| 506 | def _write_bundle( |
| 507 | gateway_dir: Path, |
| 508 | *, |
| 509 | access_token: str = "fresh", |
| 510 | refresh_token: str = "r-orig", |
| 511 | expires_at: int | None = None, |
| 512 | issuer: str = "https://idp.example/realms/openshell", |
| 513 | client_id: str = "openshell-cli", |
| 514 | ) -> None: |
| 515 | bundle: dict[str, Any] = { |
| 516 | "access_token": access_token, |
| 517 | "refresh_token": refresh_token, |
| 518 | "issuer": issuer, |
| 519 | "client_id": client_id, |
| 520 | } |
| 521 | if expires_at is not None: |
| 522 | bundle["expires_at"] = expires_at |
| 523 | (gateway_dir / "oidc_token.json").write_text(json.dumps(bundle)) |
| 524 | |
| 525 | |
| 526 | DEFAULT_ISSUER = "https://idp.example/realms/openshell" |
no outgoing calls
no test coverage detected