webfinger

package
v0.0.0-...-58aeaf4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2019 License: MPL-2.0 Imports: 8 Imported by: 0

README

What's Webfinger?

Webfinger, a protocol for discovering objects on the server. It's used by Mastodon and is important for interop'ing with Mastodon (and most ActivityPub servers).

It lives at a special route: GET /.well-known/webfinger.

We can expect a webfinger response to always looks something like this:

{
  "subject": "acct:[email protected]",

  "links": [
    {
      "rel": "self",
      "type": "application/activity+json",
      "href": "https://my-example.com/actor"
    }
  ]
}

In this case, alice is the ActivityPub Organization slug, and my-example.com is the domain of the server.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(w http.ResponseWriter, r *http.Request)

Get returns a webfinger response

Types

type Actor

type Actor struct {
	Subject string `json:"subject"`
	Links   []Link `json:"links"`
}

Actor includes links to an ActivityStreams Actor object

type Link struct {
	Rel  string `json:"rel"`
	Type string `json:"type"`
	HREF string `json:"href"`
}

Link to another ActivityStreams object

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL