did:web & Hosting
Wallet Server can create and serve a did:web document per authenticated user.
How paths are built
The server reads:
DID_WEB_DOMAIN(required): host/FQDN, without protocolDID_WEB_JSON_PATH(optional): base path; can contain:idplaceholderDID_WEB_PORT(optional): included in the DID if set
Rules:
If
DID_WEB_JSON_PATHcontains:id, it is replaced with the JWTsub.If
DID_WEB_JSON_PATHis empty, the path becomes/<sub>.The server serves
GET /did/user/:id/did.jsonpublicly to match the did:web location.
Examples
Given:
DID_WEB_DOMAIN=example.com
DID_WEB_JSON_PATH=/did/user/:idFor sub = 1234, the did:web is:
did:web:example.com:did:user:1234And the document is available at:
https://example.com/did/user/1234/did.jsonIf no base path is set:
DID_WEB_DOMAIN=example.com
# DID_WEB_JSON_PATH not setFor sub = 1234 → did:web path is /1234/did.json and the DID is did:web:example.com:1234.
Last updated