Class: OpenID::Message

Class | OpenID::Message
In: | lib/openid/message.rb lib/openid/kvpost.rb
Parent: | Object

### Methods

== _fix_ns _from_openid_args copy del_arg from_http_response from_kvform from_openid_args from_post_args get_aliased_arg get_arg get_args get_key get_openid_namespace has_key? is_openid1 is_openid2 new register_namespace_alias set_arg set_openid_namespace to_args to_form_markup to_kvform to_post_args to_url to_url_encoded update_args

### Classes and Modules

Class OpenID::Message::KeyNotFound

### Attributes

namespaces | [R] |

### Public Class methods

from_http_response(response, server_url)
from_kvform(kvform_string)

Create a message from a KVForm string

from_openid_args(openid_args)

Construct a Message from a parsed KVForm message.

from_post_args(args)

Construct a Message containing a set of POST arguments.

new(openid_namspace=nil)
register_namespace_alias(namespace_uri, alias_)

Registers a (namespace URI, alias) mapping in a global namespace alias map. Raises NamespaceAliasRegistrationError if either the namespace URI or alias has already been registered with a different value. This function is required if you want to use a namespace with an OpenID 1 message.

### Public Instance methods

==(other)
_fix_ns(namespace)

Convert an input value into the internally used values of this obejct.

_from_openid_args(openid_args)
copy()
del_arg(namespace, key)

Remove a single argument from this namespace.

get_aliased_arg(aliased_key, default=nil)
get_arg(namespace, key, default=nil)

Get a value for a namespaced key.

get_args(namespace)

Get the arguments that are defined for this namespace URI.

get_key(namespace, ns_key)

Get the key for a particular namespaced argument

get_openid_namespace()
has_key?(namespace, ns_key)
is_openid1()
is_openid2()
set_arg(namespace, key, value)

Set a single argument in this namespace

set_openid_namespace(openid_ns_uri)
to_args()

Return all namespaced arguments, failing if any non-namespaced arguments exist.

to_form_markup(action_url, form_tag_attrs=nil, submit_text='Continue')

Generate HTML form markup that contains the values in this message, to be HTTP POSTed as x-www-form-urlencoded UTF-8.

to_kvform()

Generate a KVForm string that contains the parameters in this message. This will fail is the message contains arguments outside of the "openid." prefix.

to_post_args()

Return all arguments with "openid." in from of namespaced arguments.

to_url(base_url)

Generate a GET URL with the paramters in this message attacked as query parameters.

to_url_encoded()

Generate an x-www-urlencoded string.

update_args(namespace, updates)

Set multiple key/value pairs in one call.

[Validate]