|
NAMENet::OpenID::Yadis - Perform Yadis discovery on URLs VERSIONversion 1.20 SYNOPSIS use Net::OpenID::Yadis;
my $disc = Net::OpenID::Yadis->new(
consumer => $consumer, # Net::OpenID::Consumer object
);
my $xrd = $disc->discover("http://id.example.com/") or Carp::croak($disc->err);
print $disc->identity_url; # Yadis URL (Final URL if redirected)
print $disc->xrd_url; # Yadis Resourse Descriptor URL
foreach my $srv (@$xrd) { # Loop for Each Service in Yadis Resourse Descriptor
print $srv->priority; # Service priority (sorted)
print $srv->Type; # Identifier of some version of some service (scalar, array or array ref)
print $srv->URI; # URI that resolves to a resource providing the service (scalar, array or array ref)
print $srv->extra_field("Delegate","http://openid.net/xmlns/1.0");
# Extra field of some service
}
# If you are interested only in OpenID. (either 1.1 or 2.0)
my $xrd = $self->services(
'http://specs.openid.net/auth/2.0/signon',
'http://specs.openid.net/auth/2.0/server',
'http://openid.net/signon/1.1',
);
# If you want to choose random server by code-ref.
my $xrd = $self->services(sub{($_[int(rand(@_))])});
DESCRIPTIONThis module provides an implementation of the Yadis protocol, which does XRDS-based service discovery on URLs. This module was originally developed by OHTSUKA Ko-hei as Net::Yadis::Discovery, but was forked and simplified for inclusion in the core OpenID Consumer package. This simplified version is tailored for the needs of Net::OpenID::Consumer; for other uses, Net::Yadis::Discovery is probably a better choice. CONSTRUCTOR
EXPORTThis module exports three constant values to use with discover method.
METHODS
COPYRIGHTThis 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. WARRANTYThis is free software. IT COMES WITHOUT WARRANTY OF ANY KIND. SEE ALSOYadis website: <http://yadis.org/> Net::OpenID::Yadis::Service Net::OpenID::Consumer AUTHORSBased on Net::Yadis::Discovery by OHTSUKA Ko-hei <nene@kokogiko.net> Martin Atkins <mart@degeneration.co.uk>
|