Add API keys / bearer tokens for forward auth
Some checks failed
Some checks failed
Enables server-to-server authentication for forward auth applications (e.g., video players accessing WebDAV) where browser cookies aren't available. API keys use clk_ prefixed tokens stored as HMAC hashes. Bearer token auth is checked before cookie auth in /api/verify. Invalid tokens return 401 JSON (no redirect). Requests without bearer tokens fall through to existing cookie flow unchanged. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
15
app/javascript/controllers/clipboard_controller.js
Normal file
15
app/javascript/controllers/clipboard_controller.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import { Controller } from "@hotwired/stimulus"
|
||||
|
||||
export default class extends Controller {
|
||||
static targets = ["source", "label"]
|
||||
|
||||
async copy() {
|
||||
try {
|
||||
await navigator.clipboard.writeText(this.sourceTarget.value)
|
||||
this.labelTarget.textContent = "Copied!"
|
||||
setTimeout(() => { this.labelTarget.textContent = "Copy" }, 2000)
|
||||
} catch {
|
||||
this.sourceTarget.select()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user