Using ActivityPub
+Generated by Codox
Dog-and-duck 0.1.0-SNAPSHOT
Generated by Codox
Dog-and-duck 0.1.0-SNAPSHOT
Validation Faults in ActivityPub documents
+Generated by Codox
Dog-and-duck 0.1.0-SNAPSHOT
Validation Faults in ActivityPub documents
Motivation
This document is intended to provide an extension vocabulary for ActivityStreams documents, which provides vocabulary for categorising and describing faults in ActivityPub documents.
The motivation is to be able to serialise a validation report on an ActivityPub document as an ActivityStreams document.
diff --git a/docs/codox/clj-activitypub.core.html b/docs/codox/clj-activitypub.core.html index 8c06e24..337fb9a 100644 --- a/docs/codox/clj-activitypub.core.html +++ b/docs/codox/clj-activitypub.core.html @@ -1,3 +1,3 @@ -Generated by Codox
Dog-and-duck 0.1.0-SNAPSHOT
clj-activitypub.core
copied from Jahfer’s clj-activitypub library. If and when Jahfer issues a release of that library, this directory will be deleted and a dependency on that library will be added to the project.
activity
multimethod
Produces a map representing an ActivityPub activity which can be serialized directly to JSON in the form expected by the ActivityStreams 2.0 spec. See https://www.w3.org/TR/activitystreams-vocabulary/ for reference.
actor
(actor {:keys [user-id username public-key]})
Accepts a config, and returns a map in the form expected by the ActivityPub spec. See https://www.w3.org/TR/activitypub/#actor-objects for reference.
auth-headers
(auth-headers config {:keys [body headers]})
Given a config and request map of {:body … :headers …}, returns the original set of headers with Signature and Digest attributes appended.
config
(config {:keys [domain username username-route public-key private-key], :or {username-route "/users/", public-key nil, private-key nil}})
Creates hash of computed data relevant for most ActivityPub utilities.
fetch-user
(fetch-user user-id)
Fetches the customer account details located at user-id from a remote server. Will return cached results if they exist in memory.
gen-signature-header
(gen-signature-header config headers)
Generates a HTTP Signature string based on the provided map of headers.
obj
multimethod
Produces a map representing an ActivityPub object which can be serialized directly to JSON in the form expected by the ActivityStreams 2.0 spec. See https://www.w3.org/TR/activitystreams-vocabulary/ for reference.
parse-account
(parse-account handle)
Given an ActivityPub handle (e.g. @jahfer@mastodon.social), produces a map containing {:domain … :username …}.
with-config
(with-config config)
Returns curried forms of the #activity and #obj multimethods in the form {:activity … :obj …}, with the initial parameter set to config.
Generated by Codox
Dog-and-duck 0.1.0-SNAPSHOT
clj-activitypub.core
copied from Jahfer’s clj-activitypub library. If and when Jahfer issues a release of that library, this directory will be deleted and a dependency on that library will be added to the project.
activity
multimethod
Produces a map representing an ActivityPub activity which can be serialized directly to JSON in the form expected by the ActivityStreams 2.0 spec. See https://www.w3.org/TR/activitystreams-vocabulary/ for reference.
actor
(actor {:keys [user-id username public-key]})
Accepts a config, and returns a map in the form expected by the ActivityPub spec. See https://www.w3.org/TR/activitypub/#actor-objects for reference.
auth-headers
(auth-headers config {:keys [body headers]})
Given a config and request map of {:body … :headers …}, returns the original set of headers with Signature and Digest attributes appended.
config
(config {:keys [domain username username-route public-key private-key], :or {username-route "/users/", public-key nil, private-key nil}})
Creates hash of computed data relevant for most ActivityPub utilities.
fetch-user
(fetch-user user-id)
Fetches the customer account details located at user-id from a remote server. Will return cached results if they exist in memory.
gen-signature-header
(gen-signature-header config headers)
Generates a HTTP Signature string based on the provided map of headers.
obj
multimethod
Produces a map representing an ActivityPub object which can be serialized directly to JSON in the form expected by the ActivityStreams 2.0 spec. See https://www.w3.org/TR/activitystreams-vocabulary/ for reference.
parse-account
(parse-account handle)
Given an ActivityPub handle (e.g. @jahfer@mastodon.social), produces a map containing {:domain … :username …}.
with-config
(with-config config)
Returns curried forms of the #activity and #obj multimethods in the form {:activity … :obj …}, with the initial parameter set to config.
Generated by Codox
Dog-and-duck 0.1.0-SNAPSHOT
clj-activitypub.internal.crypto
copied from Jahfer’s clj-activitypub library. If and when Jahfer issues a release of that library, this directory will be deleted and a dependency on that library will be added to the project.
Generated by Codox
Dog-and-duck 0.1.0-SNAPSHOT
clj-activitypub.internal.crypto
copied from Jahfer’s clj-activitypub library. If and when Jahfer issues a release of that library, this directory will be deleted and a dependency on that library will be added to the project.
Generated by Codox
Dog-and-duck 0.1.0-SNAPSHOT
clj-activitypub.internal.http-util
copied from Jahfer’s clj-activitypub library. If and when Jahfer issues a release of that library, this directory will be deleted and a dependency on that library will be added to the project.
digest
(digest body)
Accepts body from HTTP request and generates string for use in HTTP Digest
request header.
Generated by Codox
Dog-and-duck 0.1.0-SNAPSHOT
clj-activitypub.internal.http-util
copied from Jahfer’s clj-activitypub library. If and when Jahfer issues a release of that library, this directory will be deleted and a dependency on that library will be added to the project.
digest
(digest body)
Accepts body from HTTP request and generates string for use in HTTP Digest
request header.
Generated by Codox
Dog-and-duck 0.1.0-SNAPSHOT
clj-activitypub.internal.thread-cache
copied from Jahfer’s clj-activitypub library. If and when Jahfer issues a release of that library, this directory will be deleted and a dependency on that library will be added to the project.
Generated by Codox
Dog-and-duck 0.1.0-SNAPSHOT
clj-activitypub.internal.thread-cache
copied from Jahfer’s clj-activitypub library. If and when Jahfer issues a release of that library, this directory will be deleted and a dependency on that library will be added to the project.
Generated by Codox
Dog-and-duck 0.1.0-SNAPSHOT
clj-activitypub.webfinger
copied from Jahfer’s clj-activitypub library. If and when Jahfer issues a release of that library, this directory will be deleted and a dependency on that library will be added to the project.
fetch-user-id
(fetch-user-id domain username)
Follows the webfinger request to a remote domain, retrieving the ID of the requested account. Typically returns a string in the form of a URL.
resource-url
(resource-url domain username & [params])
Builds a URL pointing to the user’s account on the remote server.
Generated by Codox
Dog-and-duck 0.1.0-SNAPSHOT
clj-activitypub.webfinger
copied from Jahfer’s clj-activitypub library. If and when Jahfer issues a release of that library, this directory will be deleted and a dependency on that library will be added to the project.
fetch-user-id
(fetch-user-id domain username)
Follows the webfinger request to a remote domain, retrieving the ID of the requested account. Typically returns a string in the form of a URL.
resource-url
(resource-url domain username & [params])
Builds a URL pointing to the user’s account on the remote server.
Generated by Codox
Dog-and-duck 0.1.0-SNAPSHOT
dog-and-duck.quack.picky
Fault-finder for ActivityPub documents.
+Generated by Codox
Dog-and-duck 0.1.0-SNAPSHOT
dog-and-duck.quack.picky
Fault-finder for ActivityPub documents.
Generally, each -faults
function will return:
nil
if no faults were found;
diff --git a/docs/codox/dog-and-duck.quack.quack.html b/docs/codox/dog-and-duck.quack.quack.html
index 878a31d..4a768c3 100644
--- a/docs/codox/dog-and-duck.quack.quack.html
+++ b/docs/codox/dog-and-duck.quack.quack.html
@@ -1,6 +1,6 @@
-
Generated by Codox
Dog-and-duck 0.1.0-SNAPSHOT
dog-and-duck.quack.quack
Validator for ActivityPub objects: if it walks like a duck, and it quacks like a duck…
+Generated by Codox
Dog-and-duck 0.1.0-SNAPSHOT
dog-and-duck.quack.quack
Validator for ActivityPub objects: if it walks like a duck, and it quacks like a duck…
**NOTE THAT the ActivityPub spec says
Servers SHOULD validate the content they receive to avoid content spoofing attacks
diff --git a/docs/codox/dog-and-duck.scratch.core.html b/docs/codox/dog-and-duck.scratch.core.html index 15b09e5..8adeb3a 100644 --- a/docs/codox/dog-and-duck.scratch.core.html +++ b/docs/codox/dog-and-duck.scratch.core.html @@ -1,3 +1,3 @@ -dog-and-duck.scratch.core documentation \ No newline at end of file +Generated by Codox
Dog-and-duck 0.1.0-SNAPSHOT
dog-and-duck.scratch.core documentation \ No newline at end of file diff --git a/docs/codox/dog-and-duck.scratch.parser.html b/docs/codox/dog-and-duck.scratch.parser.html index 147af45..b14fd92 100644 --- a/docs/codox/dog-and-duck.scratch.parser.html +++ b/docs/codox/dog-and-duck.scratch.parser.html @@ -1,3 +1,3 @@ -Generated by Codox
Dog-and-duck 0.1.0-SNAPSHOT
dog-and-duck.scratch.parser documentation Generated by Codox
Dog-and-duck 0.1.0-SNAPSHOT
\ No newline at end of file +dog-and-duck.scratch.parser
TODO: write docs
clean
(clean json)
Take this
json
input, and return a sequence of ActivityPub objects represented by it.dog-and-duck.scratch.parser documentation Generated by Codox
Dog-and-duck 0.1.0-SNAPSHOT
\ No newline at end of file diff --git a/docs/codox/dog-and-duck.scratch.scratch.html b/docs/codox/dog-and-duck.scratch.scratch.html index f74e1c0..4f30252 100644 --- a/docs/codox/dog-and-duck.scratch.scratch.html +++ b/docs/codox/dog-and-duck.scratch.scratch.html @@ -1,3 +1,3 @@ -dog-and-duck.scratch.parser
TODO: write docs
clean
(clean json)
Take this
json
input, and return a sequence of ActivityPub objects represented by it.dog-and-duck.scratch.scratch documentation Generated by Codox
Dog-and-duck 0.1.0-SNAPSHOT
\ No newline at end of file +dog-and-duck.scratch.scratch
Scratchpad where I try to understand how to do this stuff.
dog-and-duck.scratch.scratch documentation Generated by Codox
Dog-and-duck 0.1.0-SNAPSHOT
\ No newline at end of file diff --git a/docs/codox/dog-and-duck.utils.process.html b/docs/codox/dog-and-duck.utils.process.html index 2cd7848..62f2844 100644 --- a/docs/codox/dog-and-duck.utils.process.html +++ b/docs/codox/dog-and-duck.utils.process.html @@ -1,3 +1,3 @@ -dog-and-duck.scratch.scratch
Scratchpad where I try to understand how to do this stuff.
dog-and-duck.utils.process documentation Generated by Codox
Dog-and-duck 0.1.0-SNAPSHOT
\ No newline at end of file +dog-and-duck.utils.process
TODO: write docs
pid
OK, this is hacky as fuck, but I hope it works. The problem is that the way to get the process id has changed several times during the history of Java development, and the code for one version of Java won’t even compile in a different version.
dog-and-duck.utils.process documentation Generated by Codox
Dog-and-duck 0.1.0-SNAPSHOT
\ No newline at end of file diff --git a/docs/codox/index.html b/docs/codox/index.html index de6430f..c24d74c 100644 --- a/docs/codox/index.html +++ b/docs/codox/index.html @@ -1,3 +1,3 @@ -dog-and-duck.utils.process
TODO: write docs
pid
OK, this is hacky as fuck, but I hope it works. The problem is that the way to get the process id has changed several times during the history of Java development, and the code for one version of Java won’t even compile in a different version.
Dog-and-duck 0.1.0-SNAPSHOT Generated by Codox
Dog-and-duck 0.1.0-SNAPSHOT
\ No newline at end of file +Dog-and-duck 0.1.0-SNAPSHOT
Released under the GPL-2.0-or-later
A playground for hacking ActivityPub stuff.
Installation
To install, add the following dependency to your project or build file:
[dog-and-duck "0.1.0-SNAPSHOT"]Topics
Namespaces
clj-activitypub.core
copied from Jahfer’s clj-activitypub library. If and when Jahfer issues a release of that library, this directory will be deleted and a dependency on that library will be added to the project.
Public variables and functions:
clj-activitypub.internal.crypto
copied from Jahfer’s clj-activitypub library. If and when Jahfer issues a release of that library, this directory will be deleted and a dependency on that library will be added to the project.
Public variables and functions:
clj-activitypub.internal.http-util
copied from Jahfer’s clj-activitypub library. If and when Jahfer issues a release of that library, this directory will be deleted and a dependency on that library will be added to the project.
Public variables and functions:
clj-activitypub.internal.thread-cache
copied from Jahfer’s clj-activitypub library. If and when Jahfer issues a release of that library, this directory will be deleted and a dependency on that library will be added to the project.
Public variables and functions:
clj-activitypub.webfinger
copied from Jahfer’s clj-activitypub library. If and when Jahfer issues a release of that library, this directory will be deleted and a dependency on that library will be added to the project.
Public variables and functions:
dog-and-duck.quack.quack
Validator for ActivityPub objects: if it walks like a duck, and it quacks like a duck…
dog-and-duck.scratch.scratch
Scratchpad where I try to understand how to do this stuff.
Public variables and functions:
Dog-and-duck 0.1.0-SNAPSHOT Generated by Codox
Dog-and-duck 0.1.0-SNAPSHOT
\ No newline at end of file diff --git a/docs/codox/intro.html b/docs/codox/intro.html index a753b8d..66aa6ed 100644 --- a/docs/codox/intro.html +++ b/docs/codox/intro.html @@ -1,8 +1,9 @@ -Dog-and-duck 0.1.0-SNAPSHOT
Released under the GPL-2.0-or-later
A playground for hacking ActivityPub stuff.
Installation
To install, add the following dependency to your project or build file:
[dog-and-duck "0.1.0-SNAPSHOT"]Topics
Namespaces
clj-activitypub.core
copied from Jahfer’s clj-activitypub library. If and when Jahfer issues a release of that library, this directory will be deleted and a dependency on that library will be added to the project.
Public variables and functions:
clj-activitypub.internal.crypto
copied from Jahfer’s clj-activitypub library. If and when Jahfer issues a release of that library, this directory will be deleted and a dependency on that library will be added to the project.
Public variables and functions:
clj-activitypub.internal.http-util
copied from Jahfer’s clj-activitypub library. If and when Jahfer issues a release of that library, this directory will be deleted and a dependency on that library will be added to the project.
Public variables and functions:
clj-activitypub.internal.thread-cache
copied from Jahfer’s clj-activitypub library. If and when Jahfer issues a release of that library, this directory will be deleted and a dependency on that library will be added to the project.
Public variables and functions:
clj-activitypub.webfinger
copied from Jahfer’s clj-activitypub library. If and when Jahfer issues a release of that library, this directory will be deleted and a dependency on that library will be added to the project.
Public variables and functions:
dog-and-duck.quack.quack
Validator for ActivityPub objects: if it walks like a duck, and it quacks like a duck…
dog-and-duck.scratch.scratch
Scratchpad where I try to understand how to do this stuff.
Public variables and functions:
The Old Dog and Duck Generated by Codox
Dog-and-duck 0.1.0-SNAPSHOT
The Old Dog and Duck
+Introduction Generated by Codox
Dog-and-duck 0.1.0-SNAPSHOT
Introduction
+The Old Dog and Duck
A Clojure library designed to implement the ActivityPub protocol, obviously.
-Introduction
+
The Old Dog and Duck is clearly a pub, and it’s a pub related to an activity; to whit, hunting ducks with dogs. Yes, of course one could also hunt dogs with ducks, but in practice that doesn’t work so well. The point isn’t whether or not I approve of hunting ducks with dogs (or vice versa); to be clear, I don’t. The point is that it’s a pub related to an activity, and is therefore an ActivityPub.
Are we clear?
Good.
diff --git a/docs/images/dog-and-duck-beverley.jpg b/docs/images/dog-and-duck-beverley.jpg new file mode 100644 index 0000000..f238038 Binary files /dev/null and b/docs/images/dog-and-duck-beverley.jpg differ diff --git a/docs/images/dog-and-duck-cambridge.png b/docs/images/dog-and-duck-cambridge.png new file mode 100644 index 0000000..a982b9b Binary files /dev/null and b/docs/images/dog-and-duck-cambridge.png differ diff --git a/docs/images/dog-and-duck-derby.jpg b/docs/images/dog-and-duck-derby.jpg new file mode 100644 index 0000000..674646b Binary files /dev/null and b/docs/images/dog-and-duck-derby.jpg differ diff --git a/docs/index.html b/docs/index.html index 92c6977..79a48b9 100644 --- a/docs/index.html +++ b/docs/index.html @@ -8,14 +8,7 @@The Old Dog and Duck: Documentation
--
'The Old Dog and Duck' is a fairly common pub name; - - the instance in the picture - stood in St George's Fields, London from the seventeenth century - until 1812, when the site was cleared to make way for the new Bethlehem - Hospital. -
+![]()