-
Notifications
You must be signed in to change notification settings - Fork 7
remoteStorage protocol support #162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
338f0ae
f5e1fcc
aff948a
7548004
e704adc
33e069b
a289965
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -108,6 +108,17 @@ export async function activityPubPlugin(fastify, options = {}) { | |
| { profileUrl } | ||
| ) | ||
|
|
||
| // Add remoteStorage link relation | ||
| response.links.push({ | ||
| rel: 'http://tools.ietf.org/id/draft-dejong-remotestorage', | ||
| href: `${baseUrl}/storage/${config.username}/`, | ||
| properties: { | ||
|
Comment on lines
+113
to
+115
|
||
| 'http://remotestorage.io/spec/version': 'draft-dejong-remotestorage-22', | ||
| 'http://tools.ietf.org/html/rfc6749#section-4.2': `${baseUrl}/oauth/authorize`, | ||
| 'http://tools.ietf.org/html/rfc6750#section-2.3': 'Bearer' | ||
| } | ||
| }) | ||
|
Comment on lines
+111
to
+120
|
||
|
|
||
| return reply | ||
| .header('Content-Type', 'application/jrd+json') | ||
| .header('Access-Control-Allow-Origin', '*') | ||
|
|
@@ -137,7 +148,7 @@ export async function activityPubPlugin(fastify, options = {}) { | |
| version: '2.1', | ||
| software: { | ||
| name: 'jss', | ||
| version: '0.0.67', | ||
| version: '0.0.97', | ||
| repository: 'https://github.com/JavaScriptSolidServer/JavaScriptSolidServer' | ||
| }, | ||
| protocols: ['activitypub', 'solid'], | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The WebFinger response advertises storage at
/storage/${config.username}regardless of theacct:username requested. This prevents multi-user discovery and can mislead clients if the requested acct doesn't matchconfig.username. Consider using the parsed WebFinger username in the storage href (and ensuring the storage routes validate/authorize that user appropriately).