Module: OpenID::Yadis

Module | OpenID::Yadis
In: | lib/openid/yadis/parsehtml.rb lib/openid/yadis/filters.rb lib/openid/yadis/xrds.rb lib/openid/yadis/accept.rb lib/openid/yadis/constants.rb lib/openid/yadis/discovery.rb lib/openid/yadis/xri.rb lib/openid/yadis/xrires.rb lib/openid/yadis/services.rb

### Methods

apply_filter discover each_service expand_service generate_accept_header get_acceptable get_canonical_id get_service_endpoints get_yadis_xrd html_yadis_location is_xrds? make_filter match_types mk_compound_filter parseXRDS parse_accept_header prio_sort services where_is_yadis?

### Classes and Modules

Module OpenID::Yadis::XRI
Class OpenID::Yadis::BasicServiceEndpoint
Class OpenID::Yadis::CompoundFilter
Class OpenID::Yadis::DiscoveryResult
Class OpenID::Yadis::TransformFilterMaker
Class OpenID::Yadis::XRDSError
Class OpenID::Yadis::XRDSFraud

### Constants

XRD_NS_2_0 | = | 'xri://$xrd*($v*2.0)'
XRDS_NS | = | 'xri://$xrds'
XRDS_NAMESPACES | = | { 'xrds' => XRDS_NS, 'xrd' => XRD_NS_2_0, }
YADIS_HEADER_NAME | = | 'X-XRDS-Location'
YADIS_CONTENT_TYPE | = | 'application/xrds+xml'
YADIS_ACCEPT_HEADER | = | generate_accept_header( ['text/html', 0.3], ['application/xhtml+xml', 0.5], [YADIS_CONTENT_TYPE, 1.0] |  | A value suitable for using as an accept header when performing YADIS discovery, unless the application has special requirements

### Public Class methods

apply_filter(normalized_uri, xrd_data, flt=nil)
discover(uri)

Discover services for a given URI.

uri: The identity URI as a well-formed http or https URI. The well-formedness and the protocol are not checked, but the results of this function are undefined if those properties do not hold.

returns a DiscoveryResult object

Raises DiscoveryFailure when the HTTP response does not have a 200 code.

each_service(xrds_tree, &block)

aka iterServices in Python

expand_service(service_element)
generate_accept_header(*elements)

Generate an accept header value

str or (str, float)
  -> str

get_acceptable(accept_header, have_types)
get_canonical_id(iname, xrd_tree)
get_service_endpoints(input_url, flt=nil)
get_yadis_xrd(xrds_tree)
html_yadis_location(html)
is_xrds?(xrds_tree)
make_filter(parts)

Convert a filter-convertable thing into a filter

parts should be a filter, an endpoint, a callable, or a list of any of these.

match_types(accept_types, have_types)
mk_compound_filter(parts)

Create a filter out of a list of filter-like things

Used by make_filter

parts should be a list of things that can be passed to make_filter

parseXRDS(text)
parse_accept_header(value)
prio_sort(elements)

Sort a list of elements that have priority attributes.

services(xrds_tree)
where_is_yadis?(resp)

Given a HTTPResponse, return the location of the Yadis document.

May be the URL just retrieved, another URL, or None, if I can‘t find any.

[non-blocking]

[Validate]