Skip to main content

Local auth-code challenge plugin for uv-agent.

Project description

uv-agent auth code plugin

This plugin starts a small token-protected HTTP page that shows a single six-character challenge code. Other uv-agent plugins can call the auth_code.verify action with a user-provided code.

The code is uppercase alphanumeric, case-insensitive when verified, short lived, and consumed after one successful verification.

Configuration

{
  "plugins": {
    "auth-code": {
      "enabled": true,
      "config": {
        "token": "replace-with-a-long-random-token",
        "host": "0.0.0.0",
        "port": 8765,
        "ttl_s": 120
      }
    }
  }
}

token is required. The page can be opened as:

http://127.0.0.1:8765/?token=replace-with-a-long-random-token

After token login, the plugin stores an in-memory HttpOnly session cookie.

In a persistent daemon host, port is used as configured. In a TUI/session host, the plugin keeps the configured host binding but asks the OS for an ephemeral port. Run /auth-code in the TUI to show the actual bind address and local URL.

Action

result = await context.actions.call("auth_code.verify", {"code": "A7K2Q9"})

The plugin id is auth-code. The action id remains auth_code.verify because uv-agent action ids use dotted Python-style names.

Successful verification returns:

{"ok": true, "verified": true}

Failed verification returns ok: false, verified: false, and a reason.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

uv_agent_auth_code-0.2.0.tar.gz (71.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

uv_agent_auth_code-0.2.0-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file uv_agent_auth_code-0.2.0.tar.gz.

File metadata

  • Download URL: uv_agent_auth_code-0.2.0.tar.gz
  • Upload date:
  • Size: 71.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for uv_agent_auth_code-0.2.0.tar.gz
Algorithm Hash digest
SHA256 b576c44067563f3ebe3adf88e1ae10c638468188748643bfd2b938ad9e44cb2c
MD5 bc8052e87a022ae37e16a091a320d36c
BLAKE2b-256 9453f680b571464af43dc0ec99feb7b1c4971416ed2f920caa32979b3ecbdf55

See more details on using hashes here.

Provenance

The following attestation bundles were made for uv_agent_auth_code-0.2.0.tar.gz:

Publisher: release.yml on uv-agent/auth-code

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uv_agent_auth_code-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for uv_agent_auth_code-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7bfa411cc3db5c247d73f2d87c76ee64e78342c41b7ccce9ba8f3c0882a723b6
MD5 db65523f55eba187829c36f1a9df37f0
BLAKE2b-256 af6d36afae4b035c021d6c78de3db97811195b730408edf46c2b4859b1ab2015

See more details on using hashes here.

Provenance

The following attestation bundles were made for uv_agent_auth_code-0.2.0-py3-none-any.whl:

Publisher: release.yml on uv-agent/auth-code

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page