Wykres commitów

29 Commity (58c8f95e5410e2c36df092b4432dc4f7c5f67edb)

Autor SHA1 Wiadomość Data
Alain St-Denis 58c8f95e54 Add audio and video media objects and much more. 2022-08-19 17:01:44 +00:00
Jason Robinson f6b2bb6d05 Don't crash loudly when fetching webfinger for Diaspora that does not contain XML 2019-12-15 22:55:21 +02:00
Jason Robinson b69a35b597 Refactoring of webfinger fetching into a more central location 2019-11-03 00:37:10 +02:00
Jason Robinson f41b2fb9d8 Add ActivityPub support for retrieve_remote_content fetcher 2019-08-06 00:53:27 +03:00
Jason Robinson 6238137eb8 Ensure _source_protocol is filled when creating Diaspora profile from hcard 2019-05-12 18:46:38 +03:00
Jason Robinson 0cf13a33a4 Fix fetching Diaspora remote entities 2019-03-16 04:21:20 +02:00
Jason Robinson a4db2f0beb Ensure fetch for Diaspora protocol is done with entities in lowercase
Not sure how this broke!
2019-03-14 22:31:44 +02:00
Jason Robinson 2fb2da6955 Work on ActivityPub HTTP signatures and payload delivery
Also removes some legacy cruft for the failed Diaspora URI's as ID's experiment.

Refs: #7
2019-03-06 22:42:33 +02:00
Jason Robinson cf790f8b92 No point in trying to retrieve remote diaspora content if no handle 2018-09-22 13:39:13 +03:00
Jason Robinson 6bd0a1a3ae Refactoring to not use diaspora URL's as ID's
Instead use handle or guid, whichever is relevant. Fill all attributes
on receive, expect necessary attributes on send (if supporting
diaspora).
2018-09-02 23:59:53 +03:00
Jason Robinson 939dbf15d7 Return also guid to profile
But make Diaspora entities figure handle and guid from the ID's
if necessary. If ID's are not in diaspora format, they must be
passed in separately.
2018-08-26 16:46:24 +03:00
Jason Robinson 07e637a832 Return handle to Profile
This is required to send out profiles to the diaspora network.
The profile ID will not always be in Diaspora format and thus those
wanting to support Diaspora must supply a handle.
2018-08-22 23:00:15 +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 0170a12a95 Allow guid to be empty when parsing or generating diaspora ID
Sometimes we just want a URI format Diaspora ID but don't have
a guid.
2018-02-17 20:54:18 +02:00
Jason Robinson f80211b178 Add RFC3033 webfinger generator
Also provided is a Django view and url configuration for easy addition into Django projects. Django is not a hard dependency of this library, usage of the Django view obviously requires installing Django itself. For configuration details see documentation.

Closes #108
2018-02-17 01:38:37 +02:00
Jason Robinson 77fb555a52 Refactor handle_send function
Now handle_send high level outbound helper function also allows delivering
private payloads using the Diaspora protocol.

Refs: #82
2018-02-13 23:06:19 +02:00
Jason Robinson 29b6f79705 Support fetching new style Diaspora protocol Webfinger (RFC 3033) (#110)
The legaxy Webfinger is still used as fallback if the new Webfinger is not found.

Refs: #108
2018-02-02 18:28:36 +02:00
Jason Robinson a65b040969 Support Diaspora URI scheme
Add 'id' and 'target_id' to Diaspora entities. Refactor retrieve content fetcher to use the Diaspora URI scheme based ID.
2017-10-22 14:40:12 +03:00
Jason Robinson e343369f5b New high level fetcher function retrieve_remote_content
The given ID will be fetched using the correct entity class specific remote endpoint, validated to be from the correct author against their public key and then an instance of the entity class will be constructed and returned.

Also related changes and refactoring:

* New Diaspora protocol helper `federation.utils.diaspora.retrieve_and_parse_content`. See notes regarding the high level fetcher above.
* New Diaspora protocol helper `federation.utils.fetch_public_key`. Given a `handle` as a parameter, will fetch the remote profile and return the `public_key` from it.
* Refactoring for Diaspora `MagicEnvelope` class.
* Diaspora procotol receive flow now uses the `MagicEnvelope` class to verify payloads.
* Diaspora protocol receive flow now fetches the sender public key over the network if a `sender_key_fetcher` function is not passed in. Previously an error would be raised.

Closes #103
2017-10-21 22:04:05 +03:00
Jason Robinson 78d344d6a8 Fix getting sender from a combination of legacy Diaspora encrypted payload and new entity names
For example `author`. This combination probably only existed in this library.
2017-06-08 23:37:59 +03:00
Jason Robinson 8478d3b90c Add handle_send outbound helper
Allows sending a single entity to multiple receivers. Currently public Diaspora entities supported.
2017-05-07 21:28:56 +03:00
Jason Robinson ef46515ee7 Don't crash diaspora retrieve_diaspora_webfinger on XRD parse error 2017-01-12 21:54:48 +02: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 ae717aefa8 Validate fetched remote profile
federation.utils.diaspora.retrieve_and_parse_profile will now return None if the Profile retrieved doesn't validate. This will affect also the output of federation.fetchers.retrieve_remote_profile which is the high level function to retrieve profiles.

Closes #54
2016-10-01 23:33:34 +03:00
Jason Robinson dea861db18 Fix parsing profile from hCard
In the future diaspora hCard is not guaranteed to contain pod url or username. Don't rely on these in the parser, instead pass handle to the hCard parser directly.

Closes #50
2016-09-15 15:39:41 +03:00
Jason Robinson 476c6114ec Fix hcard selectors in parse_profile_from_hcard
Closes #39
2016-09-13 11:55:42 +03:00
Jason Robinson b64031ef29 Add remote profile fetcher
High level method to fetch a remote profile. Currently falls back to Diaspora protocol as no others are supported.

Returns a Profile entity.

Closes #15
2016-07-24 20:25:16 +03:00
Jason Robinson bd805b5c31 Add utils for fetching Diaspora discovery related documents
hCard, Webfinger and host-meta.

Closes #22
2016-07-22 23:53:14 +03:00