A golang webfinger server implementation
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
928 B

  1. // Package webfinger is a server implementation of the webfinger specification. This
  2. // is a general-case package which provides the HTTP handlers and interfaces
  3. // for adding webfinger support for your system and resources.
  4. //
  5. // The simplest way to use this is to call webfinger.Default() and
  6. // then register the object as an HTTP handler:
  7. //
  8. // myResolver = ...
  9. // wf := webfinger.Default(myResolver{})
  10. // wf.NotFoundHandler = // the rest of your app
  11. // http.ListenAndService(":8080", wf)
  12. //
  13. // However, you can also register the specific webfinger handler to a path. This should
  14. // work on any router that supports net/http.
  15. //
  16. // myResolver = ...
  17. // wf := webfinger.Default(myResolver{})
  18. // http.Handle(webfinger.WebFingerPath, http.HandlerFunc(wf.Webfinger))
  19. // http.ListenAndService(":8080", nil)
  20. //
  21. // In either case, the handlers attached to the webfinger service get invoked as
  22. // needed.
  23. package webfinger