Module: OpenID

Module | OpenID
In: | lib/openid/cryptutil.rb lib/openid/urinorm.rb lib/openid/util.rb lib/openid/trustroot.rb lib/openid/message.rb lib/openid/fetchers.rb lib/openid/dh.rb lib/openid/kvform.rb lib/openid/association.rb lib/openid/kvpost.rb lib/openid/protocolerror.rb lib/openid/server.rb lib/openid/extension.rb lib/openid/consumer.rb 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 lib/openid/consumer/html_parse.rb lib/openid/consumer/idres.rb lib/openid/consumer/associationmanager.rb lib/openid/consumer/discovery.rb lib/openid/consumer/discovery_manager.rb lib/openid/consumer/checkid_request.rb lib/openid/consumer/responses.rb lib/openid/store/filesystem.rb lib/openid/store/interface.rb lib/openid/store/nonce.rb lib/openid/store/memory.rb lib/openid/extensions/sreg.rb lib/openid/extensions/ax.rb lib/openid/extensions/pape.rb

### Methods

arrange_by_type best_matching_service check_sreg_field_name discover discover_no_yadis discover_uri discover_xri discover_yadis fetch fetcher fetcher= fetcher_use_env_http_proxy find_first_href find_links_rel find_op_local_identifier get_op_or_user_services get_secret_size get_sreg_ns link_has_rel make_kv_post normalize_url openid_unescape parse_link_attrs rel_matches supports_sreg? unescape_hash

### Classes and Modules

Module OpenID::AX
Module OpenID::CryptUtil
Module OpenID::Nonce
Module OpenID::PAPE
Module OpenID::SReg
Module OpenID::Server
Module OpenID::Store
Module OpenID::TrustRoot
Module OpenID::URINorm
Module OpenID::Util
Module OpenID::Yadis
Class OpenID::AssertionError
Class OpenID::Association
Class OpenID::AssociationNegotiator
Class OpenID::Consumer
Class OpenID::DiffieHellman
Class OpenID::DiscoveryFailure
Class OpenID::Extension
Class OpenID::FetchingError
Class OpenID::HTTPRedirectLimitReached
Class OpenID::HTTPResponse
Class OpenID::HTTPStatusError
Class OpenID::KVPostNetworkError
Class OpenID::Message
Class OpenID::NamespaceAliasRegistrationError
Class OpenID::NamespaceMap
Class OpenID::OpenIDError
Class OpenID::OpenIDServiceEndpoint
Class OpenID::ProtocolError
Class OpenID::RealmVerificationRedirected
Class OpenID::SSLFetchingError
Class OpenID::ServerError
Class OpenID::StandardFetcher
Class OpenID::TypeURIMismatch
Class OpenID::UndefinedOpenIDNamespace

### Constants

VERSION | = | "2.0.4"
IDENTIFIER_SELECT | = | 'http://specs.openid.net/auth/2.0/identifier_select'
SREG_URI | = | 'http://openid.net/sreg/1.0' |  | URI for Simple Registration extension, the only commonly deployed OpenID 1.x extension, and so a special case.
OPENID1_NS | = | 'http://openid.net/signon/1.0' |  | The OpenID 1.x namespace URI
OPENID2_NS | = | 'http://specs.openid.net/auth/2.0' |  | The OpenID 2.0 namespace URI
NULL_NAMESPACE | = | :null_namespace |  | The namespace consisting of pairs with keys that are prefixed with "openid." but not in another namespace.
OPENID_NS | = | :openid_namespace |  | The null namespace, when it is an allowed OpenID namespace
BARE_NS | = | :bare_namespace |  | The top-level namespace, excluding all pairs with keys that start with "openid."
OPENID1_URL_LIMIT | = | 2047 |  | Limit, in bytes, of identity provider and return_to URLs, including response payload. See OpenID 1.1 specification, Appendix D.
OPENID_PROTOCOL_FIELDS | = | [ 'ns', 'mode', 'error', 'return_to', 'contact', 'reference', 'signed', 'assoc_type', 'session_type', 'dh_modulus', 'dh_gen', 'dh_consumer_public', 'claimed_id', 'identity', 'realm', 'invalidate_handle', 'op_endpoint', 'response_nonce', 'sig', 'assoc_handle', 'trust_root', 'openid', ] |  | All OpenID protocol fields. Used to check namespace aliases.
NO_DEFAULT | = | :no_default |  | Sentinel used for Message implementation to indicate that getArg should raise an exception instead of returning a default.
DefaultNegotiator | = | AssociationNegotiator.new([['HMAC-SHA1', 'DH-SHA1'], ['HMAC-SHA1', 'no-encryption'], ['HMAC-SHA256', 'DH-SHA256'], ['HMAC-SHA256', 'no-encryption']])
EncryptedNegotiator | = | AssociationNegotiator.new([['HMAC-SHA1', 'DH-SHA1'], ['HMAC-SHA256', 'DH-SHA256']])
REMOVED_RE | = | / # Comments <!--.*?--> # CDATA blocks | <!\[CDATA\[.*?\]\]> # script blocks | <script\b # make sure script is not an XML namespace (?!:) [^>]*>.*?<\/script> /mixu |  | Stuff to remove before we start looking for tags
OPENID_1_0_NS | = | 'http://openid.net/xmlns/1.0'
OPENID_IDP_2_0_TYPE | = | 'http://specs.openid.net/auth/2.0/server'
OPENID_2_0_TYPE | = | 'http://specs.openid.net/auth/2.0/signon'
OPENID_1_1_TYPE | = | 'http://openid.net/signon/1.1'
OPENID_1_0_TYPE | = | 'http://openid.net/signon/1.0'
OPENID_1_0_MESSAGE_NS | = | OPENID1_NS
OPENID_2_0_MESSAGE_NS | = | OPENID2_NS

### Public Class methods

arrange_by_type(service_list, preferred_types)
best_matching_service(service, preferred_types)
check_sreg_field_name(fieldname)

raise ArgumentError if fieldname is not in the defined sreg fields

discover(identifier)
discover_no_yadis(uri)
discover_uri(uri)
discover_xri(iname)
discover_yadis(uri)
fetch(url, body=nil, headers=nil, redirect_limit=StandardFetcher::REDIRECT_LIMIT)
fetcher()
fetcher=(fetcher)
fetcher_use_env_http_proxy()

Set the default fetcher to use the HTTP proxy defined in the environment variable ‘http_proxy’.

find_first_href(link_attrs_list, target_rel)
find_links_rel(link_attrs_list, target_rel)
find_op_local_identifier(service_element, type_uris)
get_op_or_user_services(openid_services)
get_secret_size(assoc_type)
get_sreg_ns(message)

Extract the simple registration namespace URI from the given OpenID message. Handles OpenID 1 and 2, as well as both sreg namespace URIs found in the wild, as well as missing namespace definitions (for OpenID 1)

link_has_rel(link_attrs, target_rel)
make_kv_post(request_message, server_url)

Send the message to the server via HTTP POST and receive and parse a response in KV Form

normalize_url(url)
openid_unescape(s)
parse_link_attrs(html)
rel_matches(rel_attr, target_rel)
supports_sreg?(endpoint)

Does the given endpoint advertise support for simple registration?

unescape_hash(h)

[Validate]