mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-09 07:13:17 +08:00
Ship uds-skill-auth as a distributable skill for field UDS credential helpers.
Business skills depend on this sibling skill instead of the plugin source tree; update the auth standard docs accordingly. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
64761c8300
commit
3595f49c86
6 changed files with 286 additions and 29 deletions
|
|
@ -1,9 +1,9 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
Official uds-auth skill helpers (Python).
|
||||
uds-skill-auth — Python helpers for UDS-backed skills.
|
||||
|
||||
Resolve current-user SSO credentials via loopback Host APIs, or call intranet
|
||||
APIs through the outbound proxy (token never needed in skill code for outbound).
|
||||
Resolve SSO credentials via loopback Host APIs, or call intranet APIs through
|
||||
the outbound proxy.
|
||||
|
||||
Environment:
|
||||
DSH_SESSION_ID — agent session id (injected by DSH shell-env)
|
||||
|
|
@ -35,7 +35,6 @@ def _base_url() -> str:
|
|||
web = (os.environ.get("DSH_WEB_URL") or "").strip().rstrip("/")
|
||||
if web:
|
||||
return web + "/uds-auth"
|
||||
# Common local defaults — try DSH_WEB_URL first in production.
|
||||
return "http://127.0.0.1:8787/uds-auth"
|
||||
|
||||
|
||||
|
|
@ -71,7 +70,6 @@ def _http_json(
|
|||
req = urllib.request.Request(url, data=data, headers=hdrs, method=method.upper())
|
||||
ctx = ssl._create_unverified_context()
|
||||
try:
|
||||
# Prefer no-proxy opener for loopback Host
|
||||
if "127.0.0.1" in url or "localhost" in url.lower():
|
||||
opener = _opener_no_proxy()
|
||||
with opener.open(req, timeout=timeout) as resp:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue