View Source ActivityPub.Safety.Containment (Bonfire v0.9.10-classic-beta.169)

This module contains some useful functions for containing objects to specific origins and determining those origins. They previously lived in the ActivityPub Transformer module.

Object containment is an important step in validating remote objects to prevent spoofing, therefore removal of object containment functions is NOT recommended.

Summary

Functions

Link to this function

contain_origin(id, params)

View Source

Checks that an imported AP object's actor matches the host it came from.

Link to this function

contain_origin_from_id(id, params)

View Source
Link to this function

restrict_unauthenticated_access?(object)

View Source
Link to this function

restrict_unauthenticated_access?(resource, kind)

View Source
Link to this function

visible_for_user?(object, actor)

View Source
@spec visible_for_user?(ActivityPub.Object.t() | nil, User.t() | nil) :: boolean()