Class OpenID::Consumer::CheckIDRequest
In: lib/openid/consumer/checkid_request.rb
Parent: Object

An object that holds the state necessary for generating an OpenID authentication request. This object holds the association with the server and the discovered information with which the request will be made.

It is separate from the consumer because you may wish to add things to the request before sending it on its way to the server. It also has serialization options that let you encode the authentication request as a URL or as a form POST.

Methods

Attributes

anonymous  [R] 
endpoint  [R] 
message  [RW] 
return_to_args  [RW] 

Public Class methods

Users of this library should not create instances of this class. Instances of this class are created by the library when needed.

Public Instance methods

Add an object that implements the extension interface for adding arguments to an OpenID message to this checkid request.

extension_request: an OpenID::Extension object.

Add an extension argument to this OpenID authentication request. You probably want to use add_extension and the OpenID::Extension interface.

Use caution when adding arguments, because they will be URL-escaped and appended to the redirect URL, which can easily get quite long.

Set whether this request should be made anonymously. If a request is anonymous, the identifier will not be sent in the request. This is only useful if you are making another kind of request with an extension in this request.

Anonymous requests are not allowed when the request is made with OpenID 1.

Get html for a form to submit this request to the IDP.

form_tag_attrs is a hash of attributes to be added to the form tag. ‘accept-charset’ and ‘enctype’ have defaults that can be overridden. If a value is supplied for ‘action’ or ‘method’, it will be replaced.

Produce a OpenID::Message representing this request.

Not specifying a return_to URL means that the user will not be returned to the site issuing the request upon its completion.

If immediate mode is requested, the OpenID provider is to send back a response immediately, useful for behind-the-scenes authentication attempts. Otherwise the OpenID provider may engage the user before providing a response. This is the default case, as the user may need to provide credentials or approve the request before a positive response can be sent.

Get a complete HTML document that autosubmits the request to the IDP with javascript. This method wraps form_markup - see that method‘s documentation for help with the parameters.

Returns a URL with an encoded OpenID request.

The resulting URL is the OpenID provider‘s endpoint URL with parameters appended as query arguments. You should redirect the user agent to this URL.

OpenID 2.0 endpoints also accept POST requests, see ‘send_redirect?’ and ‘form_markup’.

Should this OpenID authentication request be sent as a HTTP redirect or as a POST (form submission)?

This takes the same parameters as redirect_url or form_markup

[Validate]