877f69c897
Add three HTTP endpoints for OAuth login without terminal access: - GET /oauth/authorize — generates PKCE params, redirects to claude.com/cai/oauth/authorize with code=true and full scopes - GET /callback — exchanges auth code for tokens via JSON POST to platform.claude.com/v1/oauth/token, writes ~/.claude/.credentials.json - GET /oauth/status — returns current credential state as JSON Uses SHA-256 (sha2 crate) for PKCE code challenge. The authorize URL targets claude.com/cai/ (not platform.claude.com) which is required for Max/Pro subscriptions to grant user:inference scope. Users visit http://localhost:3001/oauth/authorize in their browser to authenticate. Matrix/WhatsApp can send this link when auth fails. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
46 lines
1.5 KiB
TOML
46 lines
1.5 KiB
TOML
[package]
|
|
name = "storkit"
|
|
version = "0.6.0"
|
|
edition = "2024"
|
|
build = "build.rs"
|
|
|
|
[dependencies]
|
|
async-stream = { workspace = true }
|
|
async-trait = { workspace = true }
|
|
bytes = { workspace = true }
|
|
chrono = { workspace = true, features = ["serde"] }
|
|
eventsource-stream = { workspace = true }
|
|
futures = { workspace = true }
|
|
homedir = { workspace = true }
|
|
ignore = { workspace = true }
|
|
mime_guess = { workspace = true }
|
|
notify = { workspace = true }
|
|
poem = { workspace = true, features = ["websocket"] }
|
|
poem-openapi = { workspace = true, features = ["swagger-ui"] }
|
|
portable-pty = { workspace = true }
|
|
reqwest = { workspace = true, features = ["json", "stream", "form"] }
|
|
rust-embed = { workspace = true }
|
|
serde = { workspace = true, features = ["derive"] }
|
|
serde_json = { workspace = true }
|
|
serde_urlencoded = { workspace = true }
|
|
sha2 = { workspace = true }
|
|
serde_yaml = { workspace = true }
|
|
strip-ansi-escapes = { workspace = true }
|
|
tokio = { workspace = true, features = ["rt-multi-thread", "macros", "sync", "process"] }
|
|
toml = { workspace = true }
|
|
uuid = { workspace = true, features = ["v4", "serde"] }
|
|
walkdir = { workspace = true }
|
|
matrix-sdk = { workspace = true }
|
|
pulldown-cmark = { workspace = true }
|
|
regex = { workspace = true }
|
|
|
|
# Force bundled SQLite so static musl builds don't need a system libsqlite3
|
|
libsqlite3-sys = { version = "0.35.0", features = ["bundled"] }
|
|
wait-timeout = "0.2.1"
|
|
|
|
[dev-dependencies]
|
|
tempfile = { workspace = true }
|
|
tokio-tungstenite = { workspace = true }
|
|
mockito = "1"
|
|
filetime = { workspace = true }
|