cattle_grid.extensions.examples.webfinger_lookup
Puts performing a webfinger lookup in the processing chain. In a production setting, one can include this extension via
cattle_grid.toml
[[extensions]]
module = "cattle_grid.extensions.examples.webfinger_lookup"
lookup_order = 10
Where the higher the lookup_order
, the earlier the conversion from acct
to resolvable URI happens.
In a test setting, one can make webfinger use http via
cattle_grid.toml
[[extensions]]
module = "cattle_grid.extensions.examples.webfinger_lookup"
config = { protocol = "http" }
Protocol
WebfingerLookupConfig
build_domain
build_domain(
config: WebfingerLookupConfig, acct_uri: str
) -> str
Builds the domain to use for webfinger lookups
>>> build_domain(WebfingerLookupConfig(protocol=Protocol.http),
... "acct:alice@server.example")
'http://server.example'