--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: session_key_prefix
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: openid1_return_to_claimed_id_name
- !ruby/object:RI::MethodSummary 
  name: openid1_return_to_claimed_id_name=
- !ruby/object:RI::MethodSummary 
  name: openid1_return_to_nonce_name
- !ruby/object:RI::MethodSummary 
  name: openid1_return_to_nonce_name=
comment: 
- !ruby/struct:SM::Flow::P 
  body: OpenID support for Relying Parties (aka Consumers).
- !ruby/struct:SM::Flow::P 
  body: This module documents the main interface with the OpenID consumer library. The only part of the library which has to be used and isn't documented in full here is the store required to create an Consumer instance.
- !ruby/struct:SM::Flow::H 
  level: 1
  text: OVERVIEW
- !ruby/struct:SM::Flow::P 
  body: "The OpenID identity verification process most commonly uses the following steps, as visible to the user of this library:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "1."
    body: The user enters their OpenID into a field on the consumer's site, and hits a login button.
  - !ruby/struct:SM::Flow::LI 
    label: "2."
    body: The consumer site discovers the user's OpenID provider using the Yadis protocol.
  - !ruby/struct:SM::Flow::LI 
    label: "3."
    body: The consumer site sends the browser a redirect to the OpenID provider. This is the authentication request as described in the OpenID specification.
  - !ruby/struct:SM::Flow::LI 
    label: "4."
    body: The OpenID provider's site sends the browser a redirect back to the consumer site. This redirect contains the provider's response to the authentication request.
  type: :NUMBER
- !ruby/struct:SM::Flow::P 
  body: The most important part of the flow to note is the consumer's site must handle two separate HTTP requests in order to perform the full identity check.
- !ruby/struct:SM::Flow::H 
  level: 1
  text: LIBRARY DESIGN
- !ruby/struct:SM::Flow::P 
  body: This consumer library is designed with that flow in mind. The goal is to make it as easy as possible to perform the above steps securely.
- !ruby/struct:SM::Flow::P 
  body: At a high level, there are two important parts in the consumer library. The first important part is this module, which contains the interface to actually use this library. The second is openid/store/interface.rb, which describes the interface to use if you need to create a custom method for storing the state this library needs to maintain between requests.
- !ruby/struct:SM::Flow::P 
  body: In general, the second part is less important for users of the library to know about, as several implementations are provided which cover a wide variety of situations in which consumers may use the library.
- !ruby/struct:SM::Flow::P 
  body: The Consumer class has methods corresponding to the actions necessary in each of steps 2, 3, and 4 described in the overview. Use of this library should be as easy as creating an Consumer instance and calling the methods appropriate for the action the site wants to take.
- !ruby/struct:SM::Flow::P 
  body: This library automatically detects which version of the OpenID protocol should be used for a transaction and constructs the proper requests and responses. Users of this library do not need to worry about supporting multiple protocol versions; the library supports them implicitly. Depending on the version of the protocol in use, the OpenID transaction may be more secure. See the OpenID specifications for more information.
- !ruby/struct:SM::Flow::H 
  level: 1
  text: SESSIONS, STORES, AND STATELESS MODE
- !ruby/struct:SM::Flow::P 
  body: "The Consumer object keeps track of two types of state:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "1."
    body: State of the user's current authentication attempt. Things like the identity URL, the list of endpoints discovered for that URL, and in case where some endpoints are unreachable, the list of endpoints already tried. This state needs to be held from Consumer.begin() to Consumer.complete(), but it is only applicable to a single session with a single user agent, and at the end of the authentication process (i.e. when an OP replies with either <tt>id_res</tt>. or <tt>cancel</tt> it may be discarded.
  - !ruby/struct:SM::Flow::LI 
    label: "2."
    body: State of relationships with servers, i.e. shared secrets (associations) with servers and nonces seen on signed messages. This information should persist from one session to the next and should not be bound to a particular user-agent.
  type: :NUMBER
- !ruby/struct:SM::Flow::P 
  body: These two types of storage are reflected in the first two arguments of Consumer's constructor, <tt>session</tt> and <tt>store</tt>. <tt>session</tt> is a dict-like object and we hope your web framework provides you with one of these bound to the user agent. <tt>store</tt> is an instance of Store.
- !ruby/struct:SM::Flow::P 
  body: Since the store does hold secrets shared between your application and the OpenID provider, you should be careful about how you use it in a shared hosting environment. If the filesystem or database permissions of your web host allow strangers to read from them, do not store your data there! If you have no safe place to store your data, construct your consumer with nil for the store, and it will operate only in stateless mode. Stateless mode may be slower, put more load on the OpenID provider, and trusts the provider to keep you safe from replay attacks.
- !ruby/struct:SM::Flow::P 
  body: Several store implementation are provided, and the interface is fully documented so that custom stores can be used as well. See the documentation for the Consumer class for more information on the interface for stores. The implementations that are provided allow the consumer site to store the necessary data in several different ways, including several SQL databases and normal files on disk.
- !ruby/struct:SM::Flow::H 
  level: 1
  text: IMMEDIATE MODE
- !ruby/struct:SM::Flow::P 
  body: In the flow described above, the user may need to confirm to the OpenID provider that it's ok to disclose his or her identity. The provider may draw pages asking for information from the user before it redirects the browser back to the consumer's site. This is generally transparent to the consumer site, so it is typically ignored as an implementation detail.
- !ruby/struct:SM::Flow::P 
  body: There can be times, however, where the consumer site wants to get a response immediately. When this is the case, the consumer can put the library in immediate mode. In immediate mode, there is an extra response possible from the server, which is essentially the server reporting that it doesn't have enough information to answer the question yet.
- !ruby/struct:SM::Flow::H 
  level: 1
  text: USING THIS LIBRARY
- !ruby/struct:SM::Flow::P 
  body: "Integrating this library into an application is usually a relatively straightforward process. The process should basically follow this plan:"
- !ruby/struct:SM::Flow::P 
  body: Add an OpenID login field somewhere on your site. When an OpenID is entered in that field and the form is submitted, it should make a request to the your site which includes that OpenID URL.
- !ruby/struct:SM::Flow::P 
  body: First, the application should instantiate a Consumer with a session for per-user state and store for shared state using the store of choice.
- !ruby/struct:SM::Flow::P 
  body: Next, the application should call the <tt>begin</tt> method of Consumer instance. This method takes the OpenID URL as entered by the user. The <tt>begin</tt> method returns a CheckIDRequest object.
- !ruby/struct:SM::Flow::P 
  body: Next, the application should call the redirect_url method on the CheckIDRequest object. The parameter <tt>return_to</tt> is the URL that the OpenID server will send the user back to after attempting to verify his or her identity. The <tt>realm</tt> parameter is the URL (or URL pattern) that identifies your web site to the user when he or she is authorizing it. Send a redirect to the resulting URL to the user's browser.
- !ruby/struct:SM::Flow::P 
  body: That's the first half of the authentication process. The second half of the process is done after the user's OpenID Provider sends the user's browser a redirect back to your site to complete their login.
- !ruby/struct:SM::Flow::P 
  body: When that happens, the user will contact your site at the URL given as the <tt>return_to</tt> URL to the redirect_url call made above. The request will have several query parameters added to the URL by the OpenID provider as the information necessary to finish the request.
- !ruby/struct:SM::Flow::P 
  body: Get a Consumer instance with the same session and store as before and call its complete() method, passing in all the received query arguments and URL currently being handled.
- !ruby/struct:SM::Flow::P 
  body: There are multiple possible return types possible from that method. These indicate the whether or not the login was successful, and include any additional information appropriate for their type.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Code returned when either the of the OpenID::OpenIDConsumer.begin_auth or OpenID::OpenIDConsumer.complete_auth methods return successfully.
  name: SUCCESS
  value: ":success"
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Code OpenID::OpenIDConsumer.complete_auth returns when the value it received indicated an invalid login.
  name: FAILURE
  value: ":failure"
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Code returned by OpenIDConsumer.complete_auth when the user cancels the operation from the server.
  name: CANCEL
  value: ":cancel"
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Code returned by OpenID::OpenIDConsumer.complete_auth when the OpenIDConsumer instance is in immediate mode and ther server sends back a URL for the user to login with.
  name: SETUP_NEEDED
  value: ":setup_needed"
full_name: OpenID::Consumer
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: association_manager
- !ruby/object:RI::MethodSummary 
  name: begin
- !ruby/object:RI::MethodSummary 
  name: begin_without_discovery
- !ruby/object:RI::MethodSummary 
  name: cleanup_last_requested_endpoint
- !ruby/object:RI::MethodSummary 
  name: cleanup_session
- !ruby/object:RI::MethodSummary 
  name: complete
- !ruby/object:RI::MethodSummary 
  name: complete_cancel
- !ruby/object:RI::MethodSummary 
  name: complete_error
- !ruby/object:RI::MethodSummary 
  name: complete_id_res
- !ruby/object:RI::MethodSummary 
  name: complete_invalid
- !ruby/object:RI::MethodSummary 
  name: complete_setup_needed
- !ruby/object:RI::MethodSummary 
  name: discover
- !ruby/object:RI::MethodSummary 
  name: discovery_manager
- !ruby/object:RI::MethodSummary 
  name: handle_idres
- !ruby/object:RI::MethodSummary 
  name: last_requested_endpoint
- !ruby/object:RI::MethodSummary 
  name: last_requested_endpoint=
- !ruby/object:RI::MethodSummary 
  name: negotiator
- !ruby/object:RI::MethodSummary 
  name: session_get
- !ruby/object:RI::MethodSummary 
  name: session_key
- !ruby/object:RI::MethodSummary 
  name: session_set
name: Consumer
superclass: Object
