Mercurial > libervia-backend
comparison sat/plugins/plugin_comp_ap_gateway/http_server.py @ 3826:81c79b7cafa7
tests (unit/ap-gateway): tests for XMPP identity/vCard4 <=> AP actor data conversion:
rel 368
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 29 Jun 2022 14:06:33 +0200 |
parents | 0b1c30ff2cbb |
children | 381340b9a9ee |
comparison
equal
deleted
inserted
replaced
3825:10a4846818e5 | 3826:81c79b7cafa7 |
---|---|
289 self, | 289 self, |
290 request: "HTTPRequest", | 290 request: "HTTPRequest", |
291 account_jid: jid.JID, | 291 account_jid: jid.JID, |
292 node: Optional[str], | 292 node: Optional[str], |
293 ap_account: str, | 293 ap_account: str, |
294 actor_url: str, | 294 ap_url: str, |
295 signing_actor: Optional[str] | 295 signing_actor: Optional[str] |
296 ) -> dict: | 296 ) -> dict: |
297 inbox = self.apg.buildAPURL(TYPE_INBOX, ap_account) | 297 inbox = self.apg.buildAPURL(TYPE_INBOX, ap_account) |
298 shared_inbox = self.apg.buildAPURL(TYPE_SHARED_INBOX) | 298 shared_inbox = self.apg.buildAPURL(TYPE_SHARED_INBOX) |
299 outbox = self.apg.buildAPURL(TYPE_OUTBOX, ap_account) | 299 outbox = self.apg.buildAPURL(TYPE_OUTBOX, ap_account) |
310 "@context": [ | 310 "@context": [ |
311 "https://www.w3.org/ns/activitystreams", | 311 "https://www.w3.org/ns/activitystreams", |
312 "https://w3id.org/security/v1" | 312 "https://w3id.org/security/v1" |
313 ], | 313 ], |
314 | 314 |
315 "id": actor_url, | 315 "id": ap_url, |
316 "type": "Person", | 316 "type": "Person", |
317 "preferredUsername": preferred_username, | 317 "preferredUsername": preferred_username, |
318 "inbox": inbox, | 318 "inbox": inbox, |
319 "outbox": outbox, | 319 "outbox": outbox, |
320 "followers": followers, | 320 "followers": followers, |
321 "following": following, | 321 "following": following, |
322 "publicKey": { | 322 "publicKey": { |
323 "id": f"{actor_url}#main-key", | 323 "id": f"{ap_url}#main-key", |
324 "owner": actor_url, | 324 "owner": ap_url, |
325 "publicKeyPem": self.apg.public_key_pem | 325 "publicKeyPem": self.apg.public_key_pem |
326 }, | 326 }, |
327 "endpoints": { | 327 "endpoints": { |
328 "sharedInbox": shared_inbox | 328 "sharedInbox": shared_inbox |
329 }, | 329 }, |