Wykres commitów

12 Commity (master)

Autor SHA1 Wiadomość Data
Jason Robinson 2fa8271af7 Refactor handle_receive to require a RequestType
The ActivityPub protocol handlers require access to HTTP headers,
method and url from the incoming request. Thus require passing in
a RequestType object, which has the same structure as a Django
HttpRequest for compatibility.

This is a breaking backwards compatible change requiring Diaspora
payloads be wrapped in a RequestType object.

Refs: #7
2019-03-03 03:04:08 +02:00
Jason Robinson a1b3afba7f Move handle_send protocol identification to federation module root
Add also "identify by id" function.
2019-03-02 01:24:57 +02:00
Jason Robinson d2c35a2cdc Add ActivityPub to protocols and function to identify payload 2018-10-11 19:16:36 +03:00
Jason Robinson 493ee7bf22 Refactoring of diaspora protocol support to use ID's everywhere
Entities no longer have `handle` or `guid`, `target_guid` or
`target_handle` attributes. These are
now properties on the Diaspora entities only. For working with
entities, the new URI based attributes should be used. These are
`id`, `target_id` and `actor_id`. Depending on entity type, some
of these will be required while some not (just like with handle,
guid, target_guid and target_handle before).

All high level methods now expect ID's and return ID's for everything.
Internally the diaspora protocol still works with handle's and guid's.

This opens adding ActivityPub which works with URI ID's everywhere.
2018-08-11 23:41:15 +03:00
Jason Robinson 934bd69bba Verify payload and entity handle are the same
Add proper checks to make sure Diaspora protocol payload handle and entity handle are the same. Even though we already verified the signature of the sender, we didn't ensure that the sender isn't trying to fake an entity authored by someone else.

The Diaspora protocol functions `message_to_objects` and `element_to_objects` now require a new parameter, the payload sender handle. These functions should normally not be needed to be used directly.
2017-08-06 14:04:50 +03:00
Jason Robinson d64a2c27a2 Add receiving user guid to entity for private Diaspora payloads
Required for example to actually use (legacy) relationship retraction.
2017-05-21 22:46:23 +03:00
Jason Robinson 75272cc820 Improve documentation of handle_receive inbound method
Sender returned by the method is confusing as it's not necessarily the author of any of the returned entities. Clarify in the docstring.

Closes #16
2017-05-06 23:15:22 +03:00
Jason Robinson 7ccc070711 Pass sender_key_fetcher to mappers from inbound handler 2017-05-01 19:27:44 +03:00
Jason Robinson c5becee7fe Rename library to federation
Less typing saves lives.
2016-10-04 22:07:24 +03:00
Jason Robinson 4edca37168 Init documentation
Closes #34
2016-10-02 23:07:39 +03:00
Jason Robinson cf62f6fcf1 Add handle receive payload logging
Closes #29
2016-07-24 21:54:54 +03:00
Jason Robinson 7b458b7fc7 Split federation.controllers to inbound and outbound 2016-07-23 13:37:56 +03:00