Class | OpenID::OpenIDServiceEndpoint |
In: |
lib/openid/service.rb
|
Parent: | ServiceEndpoint |
OpenIDService is an object representation of an OpenID server, and the services it provides. It contains a useful information such as the server URL, and information about the OpenID identity bound to the server. OpenIDService object should be produced using the OpenIDService.from_service class method with a Yadis Service object. See the ruby Yadis library for more information:
www.openidenabled.com/yadis/libraries/ruby
Unless you choose to do your own discovery and interface with OpenIDConsumer through the OpenIDConsumer.begin_without_discovery method, you won‘t need to ever use this object directly. It is used internally by the OpenIDConsumer object.
canonical_id | [RW] | |
delegate_url | [RW] | |
service_types | [RW] | |
uri | [RW] | |
xrds_uri | [RW] | |
yadis_url | [RW] |
Class method to produce OpenIDService objects. Call with a Yadis Service object. Will return nil if the Service object does not represent an an OpenID server.
Class method to determine if a Yadis service object is an OpenID server. versions is a list of Strings representing the versions of the OpenID protocol you support. Only service that match one of the versions will return a value that evaluates to true. If no versions list is specified, all versions will be accepted.
The URL the user entered to authenticate. For example, if example.com/ delegates to example.myopenid.com/, this method will return example.com/
Returns user‘s URL which resides on the OpenID server. For example if example.com/ delegates to example.myopenid.com/, then example.myopenid.com/ will be returned by this method.
Same as uses_extension? Checks to see if the provided URL is in the list of service types. Example that checks for support of the simple registratino protocol:
service.supports?('http://openid.net/sreg/1.0')