···106106# INVITE_CODE_REQUIRED=false
107107# Comma-separated list of available user domains
108108# AVAILABLE_USER_DOMAINS=example.com
109109+# Enable self-hosted did:web identities (default: true)
110110+# Hosting did:web requires a long-term commitment to serve DID documents.
111111+# Set to false if you don't want to offer this option.
112112+# ENABLE_SELF_HOSTED_DID_WEB=true
109113# =============================================================================
110114# Server Metadata (returned by describeServer)
111115# =============================================================================
···8787 "didPlcHint": "Portable identity managed by PLC Directory",
8888 "didWeb": "did:web",
8989 "didWebHint": "Identity hosted on this PDS (read warning below)",
9090+ "didWebDisabledHint": "Not available on this PDS - use did:plc or bring your own did:web",
9091 "didWebBYOD": "did:web (BYOD)",
9192 "didWebBYODHint": "Bring your own domain",
9293 "didWebWarningTitle": "Important: Understand the trade-offs",
···175176 "navDelegation": "Delegation",
176177 "navDelegationDesc": "Manage account controllers and delegated accounts",
177178 "navAdmin": "Admin Panel",
178178- "navAdminDesc": "Server stats and admin operations"
179179+ "navAdminDesc": "Server stats and admin operations",
180180+ "navDidDocument": "DID Document",
181181+ "navDidDocumentDesc": "Manage your DID document for external migrations",
182182+ "migrated": "Migrated",
183183+ "migratedTitle": "Account Migrated",
184184+ "migratedMessage": "Your account has migrated to {pds}. Your DID document is still hosted here, and you can update it for future migrations.",
185185+ "navMigrateAgain": "Migrate Again",
186186+ "navMigrateAgainDesc": "Move to another PDS and update your DID document"
187187+ },
188188+ "didEditor": {
189189+ "title": "DID Document Editor",
190190+ "preview": "Current DID Document",
191191+ "verificationMethods": "Verification Methods",
192192+ "verificationMethodsDesc": "Signing keys that can act on behalf of your DID. When you migrate to a new PDS, add their signing key here.",
193193+ "addKey": "Add Key",
194194+ "removeKey": "Remove",
195195+ "keyId": "Key ID",
196196+ "keyIdPlaceholder": "#atproto",
197197+ "publicKey": "Public Key (Multibase)",
198198+ "publicKeyPlaceholder": "zQ3sh...",
199199+ "noKeys": "No verification methods configured. Using the local PDS key.",
200200+ "alsoKnownAs": "Also Known As",
201201+ "alsoKnownAsDesc": "Handles that point to your DID. Update this when your handle changes on a new PDS.",
202202+ "addHandle": "Add Handle",
203203+ "removeHandle": "Remove",
204204+ "handle": "Handle",
205205+ "handlePlaceholder": "at://handle.newpds.com",
206206+ "noHandles": "No handles configured. Using the local handle.",
207207+ "serviceEndpoint": "Service Endpoint",
208208+ "serviceEndpointDesc": "The PDS that currently hosts your account data. Update this when migrating.",
209209+ "currentPds": "Current PDS URL",
210210+ "save": "Save Changes",
211211+ "saving": "Saving...",
212212+ "success": "DID document updated successfully",
213213+ "saveFailed": "Failed to save DID document",
214214+ "loadFailed": "Failed to load DID document",
215215+ "invalidMultibase": "Public key must be a valid multibase string starting with 'z'",
216216+ "invalidHandle": "Handle must be an at:// URI (e.g., at://handle.example.com)",
217217+ "helpTitle": "What is this?",
218218+ "helpText": "When you migrate to another PDS, that PDS generates new signing keys. Update your DID document here so it points to your new keys and location. This enables multi-hop migrations (PDS 1 → PDS 2 → PDS 3)."
179219 },
180220 "settings": {
181221 "title": "Account Settings",
···792832 "didPlcHint": "Portable identity managed by PLC Directory",
793833 "didWeb": "did:web",
794834 "didWebHint": "Identity hosted on this PDS (read warning below)",
835835+ "didWebDisabledHint": "Not available on this PDS - use did:plc or bring your own did:web",
795836 "didWebBYOD": "did:web (BYOD)",
796837 "didWebBYODHint": "Bring your own domain",
797838 "didWebWarningTitle": "Important: Understand the trade-offs",
···8787 "didPlcHint": "Portabel identitet hanterad av PLC Directory",
8888 "didWeb": "did:web",
8989 "didWebHint": "Identitet lagrad på denna PDS (läs varningen nedan)",
9090+ "didWebDisabledHint": "Inte tillgänglig på denna PDS - använd did:plc eller ta med din egen did:web",
9091 "didWebBYOD": "did:web (egen domän)",
9192 "didWebBYODHint": "Använd din egen domän",
9293 "didWebWarningTitle": "Viktigt: Förstå avvägningarna",
···175176 "navDelegation": "Delegering",
176177 "navDelegationDesc": "Hantera kontokontrollanter och delegerade konton",
177178 "navAdmin": "Adminpanel",
178178- "navAdminDesc": "Serverstatistik och administratörsoperationer"
179179+ "navAdminDesc": "Serverstatistik och administratörsoperationer",
180180+ "navDidDocument": "DID-dokument",
181181+ "navDidDocumentDesc": "Hantera ditt DID-dokument och nycklar",
182182+ "migrated": "Flyttad",
183183+ "migratedTitle": "Konto flyttat",
184184+ "migratedMessage": "Ditt konto har flyttats till {pds}. Ditt DID-dokument finns fortfarande här.",
185185+ "navMigrateAgain": "Flytta igen",
186186+ "navMigrateAgainDesc": "Flytta till en annan PDS och uppdatera ditt DID-dokument"
187187+ },
188188+ "didEditor": {
189189+ "title": "DID-dokumentredigerare",
190190+ "preview": "Nuvarande DID-dokument",
191191+ "verificationMethods": "Verifieringsmetoder (signeringsnycklar)",
192192+ "addKey": "Lägg till nyckel",
193193+ "removeKey": "Ta bort",
194194+ "keyId": "Nyckel-ID",
195195+ "keyIdPlaceholder": "#atproto",
196196+ "publicKey": "Publik nyckel (Multibase)",
197197+ "publicKeyPlaceholder": "zQ3sh...",
198198+ "alsoKnownAs": "Även känd som (användarnamn)",
199199+ "addHandle": "Lägg till användarnamn",
200200+ "handlePlaceholder": "at://handle.pds.com",
201201+ "serviceEndpoint": "Tjänstslutpunkt (nuvarande PDS)",
202202+ "save": "Spara ändringar",
203203+ "saving": "Sparar...",
204204+ "success": "DID-dokumentet har uppdaterats",
205205+ "helpTitle": "Vad är detta?",
206206+ "helpText": "När du flyttar till en annan PDS genererar den PDS nya signeringsnycklar. Uppdatera ditt DID-dokument här så att det pekar på dina nya nycklar och plats."
179207 },
180208 "settings": {
181209 "title": "Kontoinställningar",
···817845 "didPlcHint": "Portabel identitet som hanteras av PLC Directory",
818846 "didWeb": "did:web",
819847 "didWebHint": "Identitet som lagras på denna PDS (läs varningen nedan)",
848848+ "didWebDisabledHint": "Inte tillgänglig på denna PDS - använd did:plc eller ta med din egen did:web",
820849 "didWebBYOD": "did:web (BYOD)",
821850 "didWebBYODHint": "Ta med din egen domän",
822851 "didWebWarningTitle": "Viktigt: Förstå kompromisserna",
···1111 validate_bearer_token_cached_allow_deactivated, validate_token_with_dpop,
1212};
1313use crate::state::AppState;
1414+use crate::util::build_full_url;
14151516pub struct BearerAuth(pub AuthenticatedUser);
1617···164165 if extracted.is_dpop {
165166 let dpop_proof = parts.headers.get("dpop").and_then(|h| h.to_str().ok());
166167 let method = parts.method.as_str();
167167- let uri = parts.uri.to_string();
168168+ let uri = build_full_url(&parts.uri.to_string());
168169169170 match validate_token_with_dpop(
170171 &state.db,
···217218 if extracted.is_dpop {
218219 let dpop_proof = parts.headers.get("dpop").and_then(|h| h.to_str().ok());
219220 let method = parts.method.as_str();
220220- let uri = parts.uri.to_string();
221221+ let uri = build_full_url(&parts.uri.to_string());
221222222223 match validate_token_with_dpop(
223224 &state.db,
···274275 let user = if extracted.is_dpop {
275276 let dpop_proof = parts.headers.get("dpop").and_then(|h| h.to_str().ok());
276277 let method = parts.method.as_str();
277277- let uri = parts.uri.to_string();
278278+ let uri = build_full_url(&parts.uri.to_string());
278279279280 match validate_token_with_dpop(
280281 &state.db,