Net-OpenID-Common-1.17 000755 001750 000167 0 12132077574 13442 5 ustar 00rfc fuse 000000 000000 INSTALL 000644 001750 000167 446 12132077574 14537 0 ustar 00rfc fuse 000000 000000 Net-OpenID-Common-1.17 If you downloaded this package off of CPAN, it should build and install in the standard way: perl Makefile.PL make make test make install If you are building this package directly from a git repository, you will need to install Dist::Zilla first. See http://dzil.org/ Changes 000644 001750 000167 4067 12132077574 15024 0 ustar 00rfc fuse 000000 000000 Net-OpenID-Common-1.17 1.17 Apr 12 2013 1.16 Apr 01 2013 * better fix for #78218 from vlyon 1.15 Apr 01 2013 * URIFetch->fetch now returns decoded_content (closes #78218) 1.14 Nov 09 2011 1.13 Nov 06 2011 * Use/cache Last-modified: as a number, not a raw header string (closes #47349) * Pay attention to charset on application/xrds+xml content-type (closes #41310) 1.12 Oct 25 2011 * API change: IndirectMessage->new(CODEREF) CODEREF now needs to be able to also take 0 arguments and then return a list of all URI parameter names in the request (core protocol as of OpenID 2.0 needs this functionality) Added IndirectMessage->all_parameters * Use HTML::Parser for parsing HTML Added OpenID::util::html_extract_linkmetas * Fix YADIS discovery so that (1) HTML parsing is not done on YADIS documents and (2) meta/http-equiv tags are checked when there's no YADIS document or x-xrds-location header 1.11 Oct 22 2011 * Allow Plack::Request parameter objects for IndirectMessage 1.030099_004 Oct 20 2011 * Improved HTML head extraction to skip CDATA and comments * Fixed warning behavior of timing_indep_eq * new comaintainer (Roger Crew) 1.030099_003 Jan 01 2011 * Replace URL escaper with calls to URI::Escape (Robert Norris) * Removed JSON encoder in favour of using JSON::encode_json directly in N::O::Server and N::O::Consumer (Robert Norris) 1.030099_002 Dec 07 2010 * Documentation tweaks (Robert Norris) * Remove use of $& (Jess Robinson RT#63684) 1.030099_001 Nov 06 2010 * Support for Apache2::Request (mod_perl 2) (Yitzchak Scott-Thoennes) * Fix potential timing attack when checking signatures (Adam Sjøgren) (see http://lists.openid.net/pipermail/openid-security/2010-July/001156.html) * In Net::OpenID::Yadis, use the single-constant form of "use constant" so we work under Perl 5.6 where the multi constant form was not available. * Initial version with stuff moved out of Net::OpenID::Consumer. t 000755 001750 000167 0 12132077574 13626 5 ustar 00rfc fuse 000000 000000 Net-OpenID-Common-1.17 03-use-common.t 000644 001750 000167 135 12132077574 16433 0 ustar 00rfc fuse 000000 000000 Net-OpenID-Common-1.17/t #!/usr/bin/perl use strict; use Test::More tests => 1; use Net::OpenID::Common; ok(1); 1; 01-use-urifetch.t 000644 001750 000167 137 12132077574 16754 0 ustar 00rfc fuse 000000 000000 Net-OpenID-Common-1.17/t #!/usr/bin/perl use strict; use Test::More tests => 1; use Net::OpenID::URIFetch; ok(1); 1; 04-messages.t 000644 001750 000167 7777 12132077574 16224 0 ustar 00rfc fuse 000000 000000 Net-OpenID-Common-1.17/t #!/usr/bin/perl use strict; use Test::More tests => 40; use Net::OpenID::IndirectMessage; my $openid2_ns = 'http://specs.openid.net/auth/2.0'; my $sreg_ns = 'http://openid.net/extensions/sreg/1.1'; my %basic_v2_args = ( 'openid.mode' => 'id_res', 'openid.ns' => $openid2_ns, 'openid.test' => 'success', ); my %basic_v1_args = ( 'openid.mode' => 'id_res', 'openid.test' => 'success', ); my %sreg_args = ( 'openid.sreg.nickname' => 'Frank', 'openid.sreg.fullname' => 'Frank the Goat', ); my $good_v2_args = args({ %basic_v2_args, }); my $good_v1_args = args({ %basic_v1_args, }); my $sreg_v1_args = args({ %basic_v1_args, %sreg_args, }); my $sreg_v2_args = args({ %basic_v2_args, %sreg_args, 'openid.ns.sreg' => $sreg_ns, }); my $sreg_v1_in_openid_v2 = args ({ %basic_v2_args, %sreg_args, }); my $nonsense_args = args({ 'kumquats' => 'yes', 'madprops' => 'no', 'language' => 'spranglish', }); my $missing_mode_v2 = args({ 'openid.ns' => 'http://specs.openid.net/auth/2.0', }); my $unsupported_version_args = args({ %basic_v2_args, 'openid.ns' => 'http://example.com/openid/some-future-version', }); my $empty_args = args({}); my $basic_test = sub { my $args = shift; my $version = shift; is($args->protocol_version, $version, "detected version $version"); is($args->mode, 'id_res', "v$version mode correct"); is($args->get('test'), 'success', "v$version test correct"); is($args->get('missing'), undef, "v$version missing correctly"); should_die(sub { $args->get('sreg.fullname'); }, "v$version access invalid keyname croaks"); should_die(sub { $args->get(); }, "v$version missing keyname croaks"); }; # A valid OpenID 2.0 message $basic_test->($good_v2_args, 2); # A valid OpenID 1.1 message $basic_test->($good_v1_args, 1); # OpenID 1.1 message to consumer when we only support 2.0 or above is(args(\%basic_v1_args, minimum_version => 2), undef, "2.0-only doesn't understand 1.1"); my $sreg_test = sub { my $args = shift; my $version = shift; ok($args->has_ext($sreg_ns), "v$version has sreg namespace"); ok($args->get_ext($sreg_ns, 'nickname'), "v$version has sreg nickname"); is($args->get_ext($sreg_ns, 'nonsense'), undef, "v$version has no sreg nonsense"); my $sreg = $args->get_ext($sreg_ns); is(keys(%$sreg), 2, "v$version two sreg args"); ok(defined $sreg->{nickname}, "v$version has sreg nickname in hash"); ok(defined $sreg->{fullname}, "v$version has sreg fullname in hash"); should_die(sub { $args->get_ext(); }, "v$version missing namespace croaks"); }; # SREG in a valid 2.0 message $sreg_test->($sreg_v2_args, 2); # SREG in a valid 1.1 message $sreg_test->($sreg_v1_args, 1); my $missing_extension_test = sub { my $args = shift; my $version = shift; is($args->has_ext('nonsense'), 0, "v$version no nonsense extension"); is($args->get_ext('nonsense', 'nonsense'), undef, "v$version no nonsense extension argument"); is(keys(%{$args->get_ext('nonsense')}), 0, "v$version nonsense extension empty hash"); }; # A namespace that doesn't exist in a 2.0 message $missing_extension_test->($good_v2_args, 2); # A namespace that doesn't exist in a 1.1 message $missing_extension_test->($good_v1_args, 1); # V1 SREG in V2 Message is($sreg_v1_in_openid_v2->has_ext($sreg_ns), 0, "no v1 sreg in v2 message"); # Some args that aren't an OpenID message at all is($nonsense_args, undef, "nonsense args give undef"); is($missing_mode_v2, undef, "v2 with missing mode gives undef"); is($unsupported_version_args, undef, "unsupported version gives undef"); is($empty_args, undef, "empty hash gives undef"); # Passing in garbage into the constructor should_die(sub { args("HELLO WORLD!"); }, "passing string into constructor croaks"); should_die(sub { args(); }, "passing nothing into constructor croaks"); sub args { return Net::OpenID::IndirectMessage->new(@_); } sub should_die { my ($coderef, $message) = @_; eval { $coderef->(); }; $@ ? pass($message) : fail($message); } 1; 00-use-indirectmessage.t 000644 001750 000167 146 12132077574 20310 0 ustar 00rfc fuse 000000 000000 Net-OpenID-Common-1.17/t #!/usr/bin/perl use strict; use Test::More tests => 1; use Net::OpenID::IndirectMessage; ok(1); 1; 07-htmlparse.t 000644 001750 000167 15575 12132077574 16432 0 ustar 00rfc fuse 000000 000000 Net-OpenID-Common-1.17/t #!/usr/bin/perl use warnings; use strict; use Test::More; use Net::OpenID::Common; sub html_is { is_deeply(OpenID::util::html_extract_linkmetas(shift),@_) } html_is('plain text hello world',{},'plain') ; html_is('
',{},'body'); html_is('',{link =>[{rel=>'boo',href=>'real'}]},'nohead'); my $p1 = 'https://api.screenname.aol.com/auth/openidServer'; my $doc1 = <