apizit-cli 0.2.0b3__tar.gz → 0.2.0b4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (22) hide show
  1. {apizit_cli-0.2.0b3 → apizit_cli-0.2.0b4}/PKG-INFO +1 -1
  2. {apizit_cli-0.2.0b3 → apizit_cli-0.2.0b4}/pyproject.toml +1 -1
  3. {apizit_cli-0.2.0b3 → apizit_cli-0.2.0b4}/src/apizit_cli/__init__.py +1 -1
  4. {apizit_cli-0.2.0b3 → apizit_cli-0.2.0b4}/src/apizit_cli/authentication.py +16 -4
  5. {apizit_cli-0.2.0b3 → apizit_cli-0.2.0b4}/src/apizit_cli.egg-info/PKG-INFO +1 -1
  6. {apizit_cli-0.2.0b3 → apizit_cli-0.2.0b4}/README.md +0 -0
  7. {apizit_cli-0.2.0b3 → apizit_cli-0.2.0b4}/setup.cfg +0 -0
  8. {apizit_cli-0.2.0b3 → apizit_cli-0.2.0b4}/src/apizit_cli/commands.py +0 -0
  9. {apizit_cli-0.2.0b3 → apizit_cli-0.2.0b4}/src/apizit_cli/configuration.py +0 -0
  10. {apizit_cli-0.2.0b3 → apizit_cli-0.2.0b4}/src/apizit_cli/context.py +0 -0
  11. {apizit_cli-0.2.0b3 → apizit_cli-0.2.0b4}/src/apizit_cli/credential_store.py +0 -0
  12. {apizit_cli-0.2.0b3 → apizit_cli-0.2.0b4}/src/apizit_cli/domains.py +0 -0
  13. {apizit_cli-0.2.0b3 → apizit_cli-0.2.0b4}/src/apizit_cli/errors.py +0 -0
  14. {apizit_cli-0.2.0b3 → apizit_cli-0.2.0b4}/src/apizit_cli/http.py +0 -0
  15. {apizit_cli-0.2.0b3 → apizit_cli-0.2.0b4}/src/apizit_cli/main.py +0 -0
  16. {apizit_cli-0.2.0b3 → apizit_cli-0.2.0b4}/src/apizit_cli/operations.py +0 -0
  17. {apizit_cli-0.2.0b3 → apizit_cli-0.2.0b4}/src/apizit_cli/sources.py +0 -0
  18. {apizit_cli-0.2.0b3 → apizit_cli-0.2.0b4}/src/apizit_cli.egg-info/SOURCES.txt +0 -0
  19. {apizit_cli-0.2.0b3 → apizit_cli-0.2.0b4}/src/apizit_cli.egg-info/dependency_links.txt +0 -0
  20. {apizit_cli-0.2.0b3 → apizit_cli-0.2.0b4}/src/apizit_cli.egg-info/entry_points.txt +0 -0
  21. {apizit_cli-0.2.0b3 → apizit_cli-0.2.0b4}/src/apizit_cli.egg-info/requires.txt +0 -0
  22. {apizit_cli-0.2.0b3 → apizit_cli-0.2.0b4}/src/apizit_cli.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: apizit-cli
3
- Version: 0.2.0b3
3
+ Version: 0.2.0b4
4
4
  Summary: Launch supported Python, JavaScript, TypeScript or Java APIs from your terminal or CI.
5
5
  Author: APIZIT
6
6
  Classifier: Development Status :: 4 - Beta
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "apizit-cli"
7
- version = "0.2.0b3"
7
+ version = "0.2.0b4"
8
8
  description = "Launch supported Python, JavaScript, TypeScript or Java APIs from your terminal or CI."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.12"
@@ -1,3 +1,3 @@
1
1
  """The APIZIT HTTP client. Importing this package never initializes a session."""
2
2
 
3
- __version__ = "0.2.0b3"
3
+ __version__ = "0.2.0b4"
@@ -293,11 +293,23 @@ class NativeSession:
293
293
  or (len(query.get("error", [])) == 1 and 0 < len(query["error"][0]) <= 256)
294
294
  )
295
295
  )
296
- self._page(
297
- "Return to the APIZIT terminal." if valid else "Invalid login callback.",
298
- status=200 if valid else 400,
296
+ if not valid:
297
+ self._page("Invalid login callback.", status=400)
298
+ return
299
+ # Redirect before rendering: Chrome's global history retains an initial
300
+ # navigation even when JavaScript replaces its displayed URL afterward.
301
+ self.send_response(303)
302
+ self.send_header("Location", "/complete")
303
+ self.send_header("Content-Length", "0")
304
+ self.send_header("Cache-Control", "no-store")
305
+ self.send_header("Referrer-Policy", "no-referrer")
306
+ self.send_header("X-Content-Type-Options", "nosniff")
307
+ self.send_header(
308
+ "Content-Security-Policy", "default-src 'none'; frame-ancestors 'none'"
299
309
  )
300
- # Finish sending the cleanup script before allowing the server to shut down.
310
+ self.end_headers()
311
+ self.wfile.flush()
312
+ # Keep serving until the clean landing page acknowledges or the grace ends.
301
313
  if valid:
302
314
  outcome["received_at"] = time.monotonic()
303
315
  if "code" in query:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: apizit-cli
3
- Version: 0.2.0b3
3
+ Version: 0.2.0b4
4
4
  Summary: Launch supported Python, JavaScript, TypeScript or Java APIs from your terminal or CI.
5
5
  Author: APIZIT
6
6
  Classifier: Development Status :: 4 - Beta
File without changes
File without changes