Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
johnhomes edited this page Jul 7, 2015 · 6 revisions

Documentation for ruby-openid-apps-discovery (1.2.0)

Class: OpenID::GoogleDiscovery

Inherits: Object show all

Defined in: lib/gapps_openid.rb

Overview

Handles the bulk of Google's modified discovery prototcol See groups.google.com/group/google-federated-login-api/web/openid-discovery-for-hosted-domains Constant Summary

NAMESPACES =

{
  'xrds' => 'xri://$xrd*($v*2.0)',
  'xrd' => 'xri://$xrds',
  'openid' => 'http://namespace.google.com/openid/xmlns'
}

Instance Method Summary

#discover_site(domain) ⇒ Object

Handles discovery for a domain. #discover_user(domain, claimed_id) ⇒ Object

Handles discovery for a user's claimed ID. #fetch_host_meta(domain) ⇒ Object

Kickstart the discovery process by checking against Google's well-known location for hosted domains. #fetch_secure_xrds(authority, url, cache = true) ⇒ Object

Fetches the XRDS and verifies the signature and authority for the doc. #fetch_url(url) ⇒ Object

#get_cache(key) ⇒ Object

#get_user_xrds_url(xrds, claimed_id) ⇒ Object

Process the URITemplate in the XRDS to derive the location of the claimed id's XRDS. #perform_discovery(uri) ⇒ Object

Main entry point for discovery. #put_cache(key, item) ⇒ Object #site_identifier?(parsed_uri) ⇒ Boolean

Instance Method Details

#discover_site(domain) ⇒ Object

Handles discovery for a domain eg: domain(claim id) = http://www.affordablehomeinnovations.com/3d-wall-panels/ View source

#discover_user(domain, claimed_id) ⇒ Object

Handles discovery for a user's claimed ID.

#fetch_host_meta(domain) ⇒ Object

Kickstart the discovery process by checking against Google's well-known location for hosted domains. This gives us the location of the site's XRDS doc
#fetch_secure_xrds(authority, url, cache = true) ⇒ Object

Fetches the XRDS and verifies the signature and authority for the doc

#fetch_url(url) ⇒ Object

#get_cache(key) ⇒ Object

#get_user_xrds_url(xrds, claimed_id) ⇒ Object

Process the URITemplate in the XRDS to derive the location of the claimed id's XRDS

#perform_discovery(uri) ⇒ Object

Main entry point for discovery. Attempts to detect whether or not the URI is a raw domain name ('fixithere.net') vs. a user's claimed ID ('http://www.fixithere.net/sky-contact-number/') and performs the site or user discovery appropriately

#put_cache(key, item) ⇒ Object

#site_identifier?(parsed_uri) ⇒ Boolean

Returns:

(Boolean)

See: Original source]