Class OpenID::Server::Server
In: lib/openid/server.rb
Parent: Object

I handle requests for an OpenID server.

Some types of requests (those which are not checkid requests) may be handed to my handleRequest method, and I will take care of it and return a response.

For your convenience, I also provide an interface to Decoder.decode and SigningEncoder.encode through my methods decodeRequest and encodeResponse.

All my state is encapsulated in an store, which means I‘m not generally pickleable but I am easy to reconstruct.

Methods

Attributes

decoder  [RW]  I‘m using this to decode things.
encoder  [RW]  I‘m using this to encode things.
negotiator  [RW]  I use this instance of OpenID::AssociationNegotiator to determine which kinds of associations I can make and how.
op_endpoint  [RW]  My URL.
signatory  [RW]  I‘m using this for associate requests and to sign things.
store  [RW]  The back-end where my associations and nonces are stored.

Public Class methods

op_endpoint is new in library version 2.0.

Public Instance methods

Transform query parameters into an OpenIDRequest. query should contain the query parameters as a Hash with each key mapping to one value.

If the query does not seem to be an OpenID request at all, I return nil.

Encode a response to a WebResponse, signing it first if appropriate.

Raises EncodingError when I can‘t figure out how to encode this message.

Raises AlreadySigned When this response is already signed.

Handle a request.

Give me a request, I will give you a response. Unless it‘s a type of request I cannot handle myself, in which case I will raise RuntimeError. In that case, you can handle it yourself, or add a method to me for handling that request type.

Handle and respond to associate requests.

Handle and respond to check_authentication requests.

[Validate]