A Webfinger utility for Ruby

dependabot[bot] 4cd0650dbf Bump addressable from 2.5.2 to 2.8.0 %!s(int64=3) %!d(string=hai) anos
.github 4f585464ba Update gempush.yml %!s(int64=4) %!d(string=hai) anos
lib 2deb9da0ab Upgrade to HTTP.rb v4 (#9) %!s(int64=5) %!d(string=hai) anos
spec 13d8b032fd Update dependencies, do not mask HTTP/OpenSSL exceptions, do not fallback to HTTP (#4) %!s(int64=7) %!d(string=hai) anos
.gitignore 592248e4a7 Add timeouts to requests, update dependencies, bump to 1.0.3 %!s(int64=8) %!d(string=hai) anos
.rspec 592248e4a7 Add timeouts to requests, update dependencies, bump to 1.0.3 %!s(int64=8) %!d(string=hai) anos
.rubocop.yml 13d8b032fd Update dependencies, do not mask HTTP/OpenSSL exceptions, do not fallback to HTTP (#4) %!s(int64=7) %!d(string=hai) anos
.ruby-version 1fca7e670e Update dependencies and bump to 2.1.0 %!s(int64=6) %!d(string=hai) anos
.travis.yml 13d8b032fd Update dependencies, do not mask HTTP/OpenSSL exceptions, do not fallback to HTTP (#4) %!s(int64=7) %!d(string=hai) anos
Gemfile 592248e4a7 Add timeouts to requests, update dependencies, bump to 1.0.3 %!s(int64=8) %!d(string=hai) anos
Gemfile.lock 4cd0650dbf Bump addressable from 2.5.2 to 2.8.0 %!s(int64=3) %!d(string=hai) anos
LICENSE 8b0d7af683 Adding gem version badge to README %!s(int64=8) %!d(string=hai) anos
README.md 62d296bb98 Bump version to 2.1.1 (#12) %!s(int64=4) %!d(string=hai) anos
Rakefile 237a9c2e81 Adding travis CI %!s(int64=8) %!d(string=hai) anos
goldfinger.gemspec 62d296bb98 Bump version to 2.1.1 (#12) %!s(int64=4) %!d(string=hai) anos

README.md

Goldfinger, a WebFinger client for Ruby

Gem Version Build Status

A WebFinger client for Ruby. Supports application/xrd+xml and application/jrd+json responses. Raises Goldfinger::NotFoundError on failure to fetch the Webfinger or XRD data, can also raise HTTP:Error or OpenSSL::SSL::SSLError if something is wrong with the HTTPS connection it uses.

  • Does not fall back to HTTP if HTTPS is not available
  • Does check host-meta XRD, but only if the standard WebFinger path yielded no result

Installation

gem install goldfinger

Usage

data = Goldfinger.finger('acct:gargron@quitter.no')

data.link('http://schemas.google.com/g/2010#updates-from').href
# => "https://quitter.no/api/statuses/user_timeline/7477.atom"

data.aliases
# => ["https://quitter.no/user/7477", "https://quitter.no/gargron"]

data.subject
# => "acct:gargron@quitter.no"

RFC support

The official WebFinger RFC is 7033.