👋 Server Auth
Authenticate with a Caido instance using device code flow.
import asyncio
import os
from caido_server_auth import (
AuthClient,
AuthClientOptions,
AuthenticationRequest,
BrowserApprover,
)
def on_request(request: AuthenticationRequest) -> None:
print(f"Visit: {request.verification_url}")
print(f"Expires at: {request.expires_at.isoformat()}")
async def main() -> None:
instance_url = os.environ.get("CAIDO_INSTANCE_URL", "http://localhost:8080")
auth = AuthClient(
AuthClientOptions(
instance_url=instance_url,
approver=BrowserApprover(on_request),
)
)
token = await auth.start_authentication_flow()
print(token.access_token)
asyncio.run(main())
Examples
See the examples directory for complete working examples:
examples/browser_auth.py- Manual approval via browserexamples/pat_auth.py- Automated approval using Personal Access Token
💚 Community
Come join our Discord community and connect with other Caido users! We'd love to have you as part of the conversation and help with any questions you may have.
Metadata
Release files for caido-server-auth 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| caido_server_auth-0.1.3.tar.gz | 6.7 kB | Without provenance | Details for caido_server_auth-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| caido_server_auth-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for caido_server_auth-0.1.3-py3-none-any.whl |
Total release size: 17.1 kB
Release files / caido_server_auth-0.1.3.tar.gz
| Download URL | caido_server_auth-0.1.3.tar.gz |
|---|---|
| Size | 6.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5eeaa54bd5f8cb840c44afa31cba628aecccc845c9652713ed1028747c31b070
|
|
BLAKE2b-256 checksum How to use checksums |
8d9f85674f74aa3ac05124c8bcd73315f6b4fdb606c702683baf43229f0b9928
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.9.8
|
Release files / caido_server_auth-0.1.3-py3-none-any.whl
| Download URL | caido_server_auth-0.1.3-py3-none-any.whl |
|---|---|
| Size | 10.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9d7d4eac99f9b811d9771b9c856a67229fc1ddad0d887cc16792c1c98f20e7d9
|
|
BLAKE2b-256 checksum How to use checksums |
51bc5d6d7ab9c42f92319544bf4ddb7c1fc3f2f9808c7b84f88867ea86bf894e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.9.8
|
Security for caido-server-auth 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.