Class OpenID::SReg::Request
In: lib/openid/extensions/sreg.rb
Parent: Extension

An object to hold the state of a simple registration request.



ns_uri  [R] 
optional  [R] 
policy_url  [RW] 
required  [R] 

Public Class methods

Create a simple registration request that contains the fields that were requested in the OpenID request with the given arguments Takes an OpenID::CheckIDRequest, returns an OpenID::Sreg::Request return nil if the extension was not requested.

Public Instance methods

A list of all of the simple registration fields that were requested, whether they were required or optional.

Get a hash of unqualified simple registration arguments representing this request. This method is essentially the inverse of parse_extension_args. This method serializes the simple registration request fields.

Parse the unqualified simple registration request parameters and add them to this object.

This method is essentially the inverse of getExtensionArgs. This method restores the serialized simple registration request fields.

If you are extracting arguments from a standard OpenID checkid_* request, you probably want to use fromOpenIDRequest, which will extract the sreg namespace and arguments from the OpenID request. This method is intended for cases where the OpenID server needs more control over how the arguments are parsed than that method provides.

Request the specified field from the OpenID user field_name: the unqualified simple registration field name required: whether the given field should be presented

       to the user as being a required to successfully complete
       the request

strict: whether to raise an exception when a field is

       added to a request more than once

Raises ArgumentError if the field_name is not a simple registration field, or if strict is set and a field is added more than once

Add the given list of fields to the request.

Have any simple registration fields been requested?