Wykres commitów

525 Commity (e5dd3db0dc4687e46a796ec0d47ab820583a4d43)

Autor SHA1 Wiadomość Data
Jason Robinson 985b97cc04 Documentation updates regarding ActivityPub and other things 2018-09-30 20:49:55 +03:00
Jason Robinson b283ba9d89 Remove Python 2 related rows accidentally added 2018-09-30 18:52:45 +03:00
Jason Robinson bc99fe42b4 Another fix to content types accepted by activitypub_object_view 2018-09-30 17:52:09 +03:00
Jason Robinson 882711a31a Use right content types in activitypub_object_view decorator 2018-09-30 17:15:31 +03:00
Jason Robinson ceb5d0446e Add support for AS2 document webfinger rel used by Mastodon et al
Also fix reference to RFC by renaming RFC3033 to RFC7033 :P
2018-09-30 16:20:03 +03:00
Jason Robinson 865636c65b Add following and followers collection urls to AP Profile entity 2018-09-30 15:36:43 +03:00
Jason Robinson 6ab1b937f8 Serialize Post to AS2 as Note 2018-09-30 13:34:07 +03:00
Jason Robinson 13ee55dfe8 Add url to Post, Image and Comment entities 2018-09-30 13:06:18 +03:00
Jason Robinson 9f829cb044 Finalize initial ActivityPub view decorator functionality
Now returns the AS2 serialized object, if found through the
configured fetch function.
2018-09-29 19:10:44 +03:00
Jason Robinson 251f558428 Move test settings and utils for Django to tests root
Fix first AS2 view decorator test.
2018-09-29 12:12:34 +03:00
Jason Robinson 2db416c38d Make activitypub_object_view into a view decorator 2018-09-29 02:39:14 +03:00
Jason Robinson 97c0d79b50 Add ActivityPub object view
The AP object view takes in a request and either fetches the object
and renders an AS2 document or calls the fallback view, which normally
would for example be a HTML document.

The fetch function is used to get the object by ID from the application.
2018-09-26 23:31:03 +03:00
Jason Robinson 7b8f399468 Add with_slash text utility
Ensures the given text has a slash at the end.
2018-09-26 23:28:22 +03:00
Jason Robinson 837f463848 Add BaseEntity.username property
Returns username from handle or None.
2018-09-26 23:27:47 +03:00
Jason Robinson a72153e9b4 Protocol entities should inherit base entity
Se some additional required in AcitivitypubEntityMixin
2018-09-25 23:51:39 +03:00
Jason Robinson c4484d61c3 Add ActivityType enum 2018-09-25 23:50:34 +03:00
Jason Robinson 3b2aff13a1 Merge branch 'activepubs' into 'master'
Bring in latest refactoring related to ActivityPub work

See merge request jaywink/federation!131
2018-09-24 20:21:02 +00:00
Jason Robinson 2be12c356d Changelogs for changes 2018-09-24 23:13:39 +03: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 979b43636d Refactor away remaining diaspora URL generator usages :/ 2018-09-03 23:14:28 +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 7687bdd69e Fix missing handle and guids in Diaspora mappers 2018-08-26 22:23:23 +03:00
Jason Robinson 89ba3f345b Ensure sender_key_fetcher is called with id, not handle 2018-08-26 21:02:40 +03:00
Jason Robinson 946e40c0bb Fix webfinger view 2018-08-26 19:53:48 +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 e049b7be97 Add optional handle and guid to UserType
Handle is required if delivering to Diaspora platforms.
2018-08-19 22:51:11 +03:00
Jason Robinson 890e2c940b Make UserType an attrs class 2018-08-19 22:02:09 +03:00
Jason Robinson 7d78122cbc Call get contact key with sender id, not handle 2018-08-19 20:05:03 +03:00
Jason Robinson fd6f24ad34 Correct attribute _receiving_actor_id on BaseEntity 2018-08-12 19:42:22 +03:00
Jason Robinson 4c24e57bff Make retrieve_remote_profile accept an ID 2018-08-12 17:58:59 +03:00
Jason Robinson d2cba74a9d Revert: WIP 2018-08-12 00:31:20 +03:00
Jason Robinson f744c6635d Fix type hinting problems due to pycryptodome move 2018-08-11 23:56:46 +03:00
Jason Robinson cbf2e1f99c WIP 2018-08-11 23:41:15 +03:00
Jason Robinson db049c6638 Fix RSA object usage in type hints
It seems little-boxes replaced our crypto library which caused
a bit of a mayhem since some of the internal objects don't match.
If we need that library after all, will need to drop these type
hints.
2018-08-11 23:41:15 +03:00
Jason Robinson dc988add94 Add pytest-blockage 2018-08-11 23:41:15 +03:00
Jason Robinson 16e1b69061 Create top level Django url config and utilities 2018-08-11 23:41:15 +03:00
Jason Robinson 570f7c6007 Create first ActivityPub entity version, ActivitypubProfile
Corresponds to 'Person' Actor.
2018-08-11 23:41: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 a464383c63 Move get_base_utils helper to entity base utils 2018-08-11 23:41:15 +03:00
Jason Robinson 3bf4f01575 Remove support for legacy Diaspora protocol
Support for Request and the old structure of Diaspora protocol
elements and delivery has been removed. A near 100% majority of
known users using the Diaspora protocol have upgraded past versions
where the new entities came into use.
2018-08-11 23:41:15 +03:00
Jason Robinson 55985ae076 Merge branch 'patch-017' into 'master'
Switch crypto library `pycrypto` to `pycryptodome`

See merge request jaywink/federation!130
2018-08-11 20:40:53 +00:00
Jason Robinson 5a01616df1 Fix references to code to point to Feneas gitlab 2018-08-11 22:32:44 +03:00
Jason Robinson 258a067412 Merge branch 'master' into patch-017 2018-08-11 21:50:35 +03:00
Jason Robinson bc38ac990b Switch crypto library `pycrypto` to `pycryptodome`
This is a more up to date fork of the former. This fixes CVE-2018-6594 found in the former.

**Deployment note.** When updating an application, you *must* uninstall `pycrypto` first, otherwise there will be a conflict if both the versions are installed at the same time. To uninstall, do `pip uninstall pycrypto`.

Release 0.17.0
2018-08-11 21:47:16 +03:00
Jason Robinson 674e242519 Remove travis config 2018-07-23 23:21:33 +03:00
Jason Robinson 065c8594b6 Merge branch 'python36' into 'master'
Drop support for Python <= 3.5, add tox and Gitlab CI

See merge request jaywink/federation!128
2018-07-23 16:27:15 +00:00
Jason Robinson a2e08d42f5 One more place to bump Python version in docs 2018-07-23 19:21:58 +03:00
Jason Robinson bb3281d489 Add tox and gitlab CI 2018-07-23 19:15:34 +03:00
Jason Robinson 454dc8ccbc Drop compatibility for Python <= 3.5 2018-07-23 18:33:47 +03:00