@fedify/fedify 0.10.0-dev.187 → 0.10.0-dev.194

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGES.md CHANGED
@@ -8,6 +8,29 @@ Version 0.10.0
8
8
 
9
9
  To be released.
10
10
 
11
+ - Besides RSA-PKCS#1-v1.5, Fedify now supports Ed25519 for signing and
12
+ verifying the activities. [[#55]]
13
+
14
+ - Added an optional parameter to `generateCryptoKeyPair()` function,
15
+ `algorithm`, which can be either `"RSASSA-PKCS1-v1_5"` or `"Ed25519"`.
16
+ - The `importJwk()` function now accepts Ed25519 keys.
17
+ - The `exportJwk()` function now exports Ed25519 keys.
18
+ - The `importSpki()` function now accepts Ed25519 keys.
19
+ - The `exportJwk()` function now exports Ed25519 keys.
20
+
21
+ - Now multiple key pairs can be registered for an actor.
22
+
23
+ - Added `Context.getActorKeyPairs()` method.
24
+ - Deprecated `Context.getActorKey()` method.
25
+ Use `Context.getActorKeyPairs()` method instead.
26
+ - Added `ActorKeyPair` interface.
27
+ - Added `ActorCallbackSetters.setKeyPairsDispatcher()` method.
28
+ - Added `ActorKeyPairsDispatcher` type.
29
+ - Deprecated `ActorCallbackSetters.setKeyPairDispatcher()` method.
30
+ - Deprecated `ActorKeyPairDispatcher` type.
31
+ - Deprecated the third parameter of the `ActorDispatcher` callback type.
32
+ Use `Context.getActorKeyPairs()` method instead.
33
+
11
34
  - Deprecated `treatHttps` option in `FederationParameters` interface.
12
35
  Instead, use the [x-forwarded-fetch] library to recognize the
13
36
  `X-Forwarded-Host` and `X-Forwarded-Proto` headers.
@@ -19,6 +42,7 @@ To be released.
19
42
  `following`, `followers`, `outbox`, `manuallyApprovesFollowers`, and
20
43
  `url`.
21
44
 
45
+ [#55]: https://github.com/dahlia/fedify/issues/55
22
46
  [x-forwarded-fetch]: https://github.com/dahlia/x-forwarded-fetch
23
47
 
24
48
 
@@ -18,8 +18,7 @@ export function acceptsJsonLd(request) {
18
18
  export async function handleActor(request, { handle, context, actorDispatcher, authorizePredicate, onNotFound, onNotAcceptable, onUnauthorized, }) {
19
19
  if (actorDispatcher == null)
20
20
  return await onNotFound(request);
21
- const key = await context.getActorKey(handle);
22
- const actor = await actorDispatcher(context, handle, key);
21
+ const actor = await context.getActor(handle);
23
22
  if (actor == null)
24
23
  return await onNotFound(request);
25
24
  if (!acceptsJsonLd(request))
@@ -170,8 +169,7 @@ export async function handleInbox(request, { handle, context, kv, kvPrefix, acto
170
169
  return await onNotFound(request);
171
170
  }
172
171
  else if (handle != null) {
173
- const key = await context.getActorKey(handle);
174
- const actor = await actorDispatcher(context, handle, key);
172
+ const actor = await context.getActor(handle);
175
173
  if (actor == null) {
176
174
  logger.error("Actor {handle} not found.", { handle });
177
175
  return await onNotFound(request);