Skip to content

Verifying your Actor

This tool allows one to verify that an ActivityPub Actor satisfies the basic requirements for one:

  • The Actor object can be retrieved with a GET request
  • One can post to the Actor’s Inbox using a POST request

A sequence of tests are run to verify behavior with respect to varying scenarios of query behavior. The variation affects which requests use HTTP Signatures and if the requesting actor has an acct-uri associated through webfinger.

Command line usage

python -m fediverse_pasture.verify_actor

Usage:

python -m fediverse_pasture.verify_actor [OPTIONS]

Options:

  --only_generate_config
  --reload
  --https                 Flag indicates that the server runs behind https
  --port INTEGER          port to run on
  --domain TEXT           domain the service is running on
  --timeout INTEGER       Timeout for requests when verifying the actor in
                          seconds
  --help                  Show this message and exit.

One should note that the domain parameter can be different from the one used to query the application. This means that if one opens this application using http://localhost:2909, the application will use the domain given by domain to identify the actors making requests.

Exported methods

get_app()

Generates the app to be used with an application server

Usage:

VERIFY_ACTOR_DOMAIN=my_domain uvicorn --factory fediverse_pasture.verify_actor:get_app
Source code in fediverse_pasture/verify_actor.py
def get_app():
    """Generates the app to be used with an application server

    Usage:

    ```bash
    VERIFY_ACTOR_DOMAIN=my_domain uvicorn --factory fediverse_pasture.verify_actor:get_app
    ```
    """

    return build_app(
        False, os.environ.get("VERIFY_ACTOR_DOMAIN", "localhost:8000"), True
    )