The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Net::OpenID::Consumer::Yadis - library for consumers of OpenID identities, which uses Yadis protocol to search identity

SYNOPSIS

  use Net::OpenID::Consumer::Yadis;

  my $csr = Net::OpenID::Consumer::Yadis->new(
    yadis => Net::Yadis::Discovery->new(
        ua    => LWPx::ParanoidAgent->new, # You should set ua and cache on yadis object, if use.
        cache => Some::Cache->new,
    ),
    args  => $cgi,
    consumer_secret => ...,
    required_root => "http://site.example.com/",
    choose_logic => sub { ($_[int(rand(@_))]) }, # If you want to set original logic to choose one OpenID server from servers, set the code.
  );

  my $claimed_identity = $csr->claimed_identity("bradfitz.com");

  ....
  
  # After from here, same as Net::OpenID::Consumer. See Net::OpenID::Consumer's pod.

DESCRIPTION

Parent module, Net::OpenID::Consumer, is the Perl API for (the consumer half of) OpenID, a distributed identity system based on proving you own a URL, which is then your identity. More information is available at:

  http://www.openid.net/

And this module is subclass of it, which use Yadis protocol to fetch OpenID protocol's setting (identity server, delegation, etc.) from OpenID URL. More information about Yadis is available at:

  http://yadis.org/

CONSTRUCTOR

new

my $csr = Net::OpenID::Consumer::Yadis->new([ %opts ]);

You can set the yadis, choose_logic options add to Net::OpenID::Consumer's original options. See the corresponding method descriptions below.

METHODS

$csr->yadis($yadis_detector)
$csr->yadis

Getter/setter for the Net::Yadis::Discovery (or subclass) instance which will be used when find OpenID settings from OpenID URL by Yadis protocol.

It's highly recommended that, ua and cache options and methods are also included at Net::Yadis::Discovery module, and you should set it not on Net::OpenID::Consumer::Yadis's options or methods but on Net::Yadis::Discovery's. If do so, it is reuse in Net::OpenID::Consumer::Yadis.

$csr->choose_logic($code_ref)
$csr->choose_logic

Getter/setter for the choose only one OpenID server from some servers. By default, servers are sorted by priority, and first server is selected. Default logic is:

  sub { ($_[0]) }

If you want to use random server, set this logic to this method:

  sub { ($_[int(rand(@_))]) }

Logic's arguments are array of Net::Yadis::Object::OpenID objects.

COPYRIGHT

This module is Copyright (c) 2006 OHTSUKA Ko-hei. All rights reserved.

You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file. If you need more liberal licensing terms, please contact the maintainer.

WARRANTY

This is free software. IT COMES WITHOUT WARRANTY OF ANY KIND.

SEE ALSO

OpenID website: http://www.openid.net/

Yadis website: http://yadis.org/

Net::OpenID::Consumer -- Superclass of this module

Net::Yadis::Discovery -- Detecting setting of OpenID from OpenID URL

AUTHORS

OHTSUKA Ko-hei <nene@kokogiko.net>