Class OpenID::SuccessRequest
In: lib/openid/consumer.rb
Parent: OpenIDStatus

Encapsulates the information the library retrieves and uses during Consumer.begin.

Methods

Attributes

identity_url  [R] 
nonce  [R] 
return_to_args  [R] 
server_id  [R] 
server_url  [R] 
service  [R] 

Public Class methods

Creates a new SuccessRequest object. This just stores each argument in an appropriately named field.

Users of this library should not create instances of this class. Instances of this class are created by Consumer during begin.

Public Instance methods

Add an openid extension argument to the request. A simple resitration request may look something like:

 req.add_extension_arg('sreg','required','email')
 req.add_extension_arg('sreg','optional','nickname,gender')
 req.add_extension_arg('sreg','policy_url','http://example.com/policy')

Called to construct the redirect URL sent to the browser to ask the server to verify its identity. This is called in step 3 of the flow described in the overview. Please note that you don‘t need to call this method directly unless you need to create a custom redirect, as it is called directly during begin. The generated redirect should be sent to the browser which initiated the authorization request.

Parameters

trust_root
This is a URL that will be sent to the server to identify this site. The OpenID spec ( www.openid.net/specs.bml#mode-checkid_immediate ) has more information on what the trust_root value is for and what its form can be. While the trust root is officially optional in the OpenID specification, this implementation requires that it be set. Nothing is actually gained by leaving out the trust root, as you can get identical behavior by specifying the return_to URL as the trust root.
return_to
This is the URL that will be included in the generated redirect as the URL the OpenID server will send its response to. The URL passed in must handle OpenID authentication responses.
immediate
Optional. If immediate is true, the request will be made using openid.mode=checkid_immediate instead of the standard openid.mode=checkid_setup.

Return Value

Return a string which is the URL to which you should redirect the user.

Checks to see if the user‘s OpenID server additionally supports the extensions service type url provided.

[Validate]