r27140 - in /branches/upstream/libnet-oauth-perl/current: Changes MANIFEST META.yml lib/Net/OAuth.pm lib/Net/OAuth/ConsumerRequest.pm lib/Net/OAuth/Request.pm t/07-consumer-request.t

gregoa at users.alioth.debian.org gregoa at users.alioth.debian.org
Sat Nov 22 16:48:44 UTC 2008


Author: gregoa
Date: Sat Nov 22 16:48:41 2008
New Revision: 27140

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=27140
Log:
[svn-upgrade] Integrating new upstream version, libnet-oauth-perl (0.13)

Added:
    branches/upstream/libnet-oauth-perl/current/lib/Net/OAuth/ConsumerRequest.pm
    branches/upstream/libnet-oauth-perl/current/t/07-consumer-request.t
Modified:
    branches/upstream/libnet-oauth-perl/current/Changes
    branches/upstream/libnet-oauth-perl/current/MANIFEST
    branches/upstream/libnet-oauth-perl/current/META.yml
    branches/upstream/libnet-oauth-perl/current/lib/Net/OAuth.pm
    branches/upstream/libnet-oauth-perl/current/lib/Net/OAuth/Request.pm

Modified: branches/upstream/libnet-oauth-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-oauth-perl/current/Changes?rev=27140&op=diff
==============================================================================
--- branches/upstream/libnet-oauth-perl/current/Changes (original)
+++ branches/upstream/libnet-oauth-perl/current/Changes Sat Nov 22 16:48:41 2008
@@ -44,4 +44,8 @@
 	Doc edits
                                 
 0.12    Fri, 04 Jul 2008 22:58:23 UTC
-	Added support for extensions - Net::OpenMicroBlogging in particular
+	Added support for extensions - Net::OpenMicroBlogging in particular
+
+0.13    Thu, 13 Nov 2008 22:45:46 UTC
+	Added support for Consumer Request (token-less / two-legged) message type
+

Modified: branches/upstream/libnet-oauth-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-oauth-perl/current/MANIFEST?rev=27140&op=diff
==============================================================================
--- branches/upstream/libnet-oauth-perl/current/MANIFEST (original)
+++ branches/upstream/libnet-oauth-perl/current/MANIFEST Sat Nov 22 16:48:41 2008
@@ -11,6 +11,7 @@
 lib/Net/OAuth.pm
 lib/Net/OAuth/AccessTokenRequest.pm
 lib/Net/OAuth/AccessTokenResponse.pm
+lib/Net/OAuth/ConsumerRequest.pm
 lib/Net/OAuth/Message.pm
 lib/Net/OAuth/ProtectedResourceRequest.pm
 lib/Net/OAuth/Request.pm
@@ -32,5 +33,6 @@
 t/04-response.t
 t/05-auth.t
 t/06-factory.t
+t/07-consumer-request.t
 t/rsakey
 t/rsakey.pub

Modified: branches/upstream/libnet-oauth-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-oauth-perl/current/META.yml?rev=27140&op=diff
==============================================================================
--- branches/upstream/libnet-oauth-perl/current/META.yml (original)
+++ branches/upstream/libnet-oauth-perl/current/META.yml Sat Nov 22 16:48:41 2008
@@ -1,6 +1,6 @@
 ---
 name: Net-OAuth
-version: 0.12
+version: 0.13
 author:
   - 'Keith Grennan <kgrennan at cpan.org>'
 abstract: An implementation of the OAuth protocol
@@ -17,18 +17,20 @@
 provides:
   Net::OAuth:
     file: lib/Net/OAuth.pm
-    version: 0.12
+    version: 0.13
   Net::OAuth::AccessTokenRequest:
     file: lib/Net/OAuth/AccessTokenRequest.pm
   Net::OAuth::AccessTokenResponse:
     file: lib/Net/OAuth/AccessTokenResponse.pm
+  Net::OAuth::ConsumerRequest:
+    file: lib/Net/OAuth/ConsumerRequest.pm
   Net::OAuth::Message:
     file: lib/Net/OAuth/Message.pm
   Net::OAuth::ProtectedResourceRequest:
     file: lib/Net/OAuth/ProtectedResourceRequest.pm
   Net::OAuth::Request:
     file: lib/Net/OAuth/Request.pm
-    version: 0.12
+    version: 0.13
   Net::OAuth::RequestTokenRequest:
     file: lib/Net/OAuth/RequestTokenRequest.pm
   Net::OAuth::RequestTokenResponse:

Modified: branches/upstream/libnet-oauth-perl/current/lib/Net/OAuth.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-oauth-perl/current/lib/Net/OAuth.pm?rev=27140&op=diff
==============================================================================
--- branches/upstream/libnet-oauth-perl/current/lib/Net/OAuth.pm (original)
+++ branches/upstream/libnet-oauth-perl/current/lib/Net/OAuth.pm Sat Nov 22 16:48:41 2008
@@ -3,7 +3,7 @@
 use strict;
 use UNIVERSAL::require;
 
-our $VERSION = '0.12';
+our $VERSION = '0.13';
 
 sub request {
     my $self = shift;

Added: branches/upstream/libnet-oauth-perl/current/lib/Net/OAuth/ConsumerRequest.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-oauth-perl/current/lib/Net/OAuth/ConsumerRequest.pm?rev=27140&op=file
==============================================================================
--- branches/upstream/libnet-oauth-perl/current/lib/Net/OAuth/ConsumerRequest.pm (added)
+++ branches/upstream/libnet-oauth-perl/current/lib/Net/OAuth/ConsumerRequest.pm Sat Nov 22 16:48:41 2008
@@ -1,0 +1,40 @@
+package Net::OAuth::ConsumerRequest;
+use warnings;
+use strict;
+use base 'Net::OAuth::Request';
+
+sub allow_extra_params {1}
+sub sign_message {1}
+
+=head1 NAME
+
+Net::OAuth::ConsumerRequest - An OAuth Consumer Request
+
+=head1 NOTE
+
+Consumer Requests are a proposed extension to OAuth, so other
+OAuth implementations may or may not support them.
+
+=head1 SEE ALSO
+
+Consumer Request Extension Draft:
+
+L<http://oauth.googlecode.com/svn/spec/ext/consumer_request/1.0/drafts/1/spec.html>
+
+L<Net::OAuth>, L<http://oauth.net>
+
+=head1 AUTHOR
+
+Keith Grennan, C<< <kgrennan at cpan.org> >>
+
+=head1 COPYRIGHT & LICENSE
+
+Copyright 2007 Keith Grennan, all rights reserved.
+
+This program is free software; you can redistribute it and/or modify it
+under the same terms as Perl itself.
+
+=cut
+
+
+1;

Modified: branches/upstream/libnet-oauth-perl/current/lib/Net/OAuth/Request.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-oauth-perl/current/lib/Net/OAuth/Request.pm?rev=27140&op=diff
==============================================================================
--- branches/upstream/libnet-oauth-perl/current/lib/Net/OAuth/Request.pm (original)
+++ branches/upstream/libnet-oauth-perl/current/lib/Net/OAuth/Request.pm Sat Nov 22 16:48:41 2008
@@ -3,7 +3,7 @@
 use strict;
 use base qw/Net::OAuth::Message/;
 
-our $VERSION = '0.12';
+our $VERSION = '0.13';
 
 __PACKAGE__->mk_classdata(required_message_params => [qw/
     consumer_key

Added: branches/upstream/libnet-oauth-perl/current/t/07-consumer-request.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-oauth-perl/current/t/07-consumer-request.t?rev=27140&op=file
==============================================================================
--- branches/upstream/libnet-oauth-perl/current/t/07-consumer-request.t (added)
+++ branches/upstream/libnet-oauth-perl/current/t/07-consumer-request.t Sat Nov 22 16:48:41 2008
@@ -1,0 +1,38 @@
+#!perl
+
+use strict;
+use warnings;
+use Test::More tests => 6;
+
+BEGIN {
+        use_ok( 'Net::OAuth' );
+	use_ok( 'Net::OAuth::ConsumerRequest' );
+}
+
+my $request = Net::OAuth->request('consumer')->new(
+        consumer_key => 'dpf43f3p2l4k3l03',
+        consumer_secret => 'kd94hf93k423kf44',
+        request_url => 'http://provider.example.net/profile',
+        request_method => 'GET',
+        signature_method => 'HMAC-SHA1',
+        timestamp => '1191242096',
+        nonce => 'kllo9940pd9333jh',
+);
+
+$request->sign;
+
+ok($request->verify);
+
+is($request->signature_base_string, 'GET&http%3A%2F%2Fprovider.example.net%2Fprofile&oauth_consumer_key%3Ddpf43f3p2l4k3l03%26oauth_nonce%3Dkllo9940pd9333jh%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1191242096%26oauth_version%3D1.0');
+
+is($request->signature, 'SGtGiOrgTGF5Dd4RUMguopweOSU=');
+
+is($request->to_authorization_header('http://provider.example.net/', ",\n")."\n", <<EOT);
+OAuth realm="http://provider.example.net/",
+oauth_consumer_key="dpf43f3p2l4k3l03",
+oauth_nonce="kllo9940pd9333jh",
+oauth_signature="SGtGiOrgTGF5Dd4RUMguopweOSU%3D",
+oauth_signature_method="HMAC-SHA1",
+oauth_timestamp="1191242096",
+oauth_version="1.0"
+EOT




More information about the Pkg-perl-cvs-commits mailing list