r38266 - in /trunk/libnet-oauth-perl: ./ debian/ demos/twitter/ lib/Net/ lib/Net/OAuth/ lib/Net/OAuth/V1_0A/ t/

nhandler-guest at users.alioth.debian.org nhandler-guest at users.alioth.debian.org
Fri Jun 19 03:35:58 UTC 2009


Author: nhandler-guest
Date: Fri Jun 19 03:35:52 2009
New Revision: 38266

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=38266
Log:
* New upstream release
* debian/watch:
  - Update to ignore development releases.
  - Remove comments
* debian/control:
  - Add myself to list of Uploaders
  - Bump Standards-Version to 3.8.2

Added:
    trunk/libnet-oauth-perl/lib/Net/OAuth/V1_0A/
      - copied from r38265, branches/upstream/libnet-oauth-perl/current/lib/Net/OAuth/V1_0A/
    trunk/libnet-oauth-perl/t/11-spec-1.0a.t
      - copied unchanged from r38265, branches/upstream/libnet-oauth-perl/current/t/11-spec-1.0a.t
Removed:
    trunk/libnet-oauth-perl/demos/twitter/ids.txt
    trunk/libnet-oauth-perl/demos/twitter/ids2.txt
    trunk/libnet-oauth-perl/demos/twitter/toyota.xml
Modified:
    trunk/libnet-oauth-perl/Changes
    trunk/libnet-oauth-perl/MANIFEST
    trunk/libnet-oauth-perl/META.yml
    trunk/libnet-oauth-perl/debian/changelog
    trunk/libnet-oauth-perl/debian/control
    trunk/libnet-oauth-perl/debian/watch
    trunk/libnet-oauth-perl/demos/twitter/oauth-demo.zip
    trunk/libnet-oauth-perl/lib/Net/OAuth.pm
    trunk/libnet-oauth-perl/lib/Net/OAuth/Message.pm
    trunk/libnet-oauth-perl/lib/Net/OAuth/ProtectedResourceRequest.pm
    trunk/libnet-oauth-perl/lib/Net/OAuth/Request.pm
    trunk/libnet-oauth-perl/lib/Net/OAuth/RequestTokenResponse.pm
    trunk/libnet-oauth-perl/lib/Net/OAuth/Response.pm
    trunk/libnet-oauth-perl/lib/Net/OAuth/UserAuthResponse.pm
    trunk/libnet-oauth-perl/t/01-spec.t
    trunk/libnet-oauth-perl/t/04-response.t
    trunk/libnet-oauth-perl/t/05-auth.t
    trunk/libnet-oauth-perl/t/06-factory.t
    trunk/libnet-oauth-perl/t/10-misc.t

Modified: trunk/libnet-oauth-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-oauth-perl/Changes?rev=38266&op=diff
==============================================================================
--- trunk/libnet-oauth-perl/Changes (original)
+++ trunk/libnet-oauth-perl/Changes Fri Jun 19 03:35:52 2009
@@ -53,10 +53,11 @@
 	Add POD for consumer requests
 
 0.15    Fri, 05 Jun 2009 00:48:07 UTC
-	Add Twitter demo consumer
+	Added Twitter demo consumer
 	Warn if message parameter is already UTF-8 that it will be double-encoded; see I18N section of Net::OAuth manpage
 	Better handling of missing 'realm' parameter in Authorization header methods
 	Better handling of request_url parameter; see REQUEST_URL PARAMETER section of Net::OAuth manpage
-	Fix http://rt.cpan.org/Public/Bug/Display.html?id=44699 - encode spaces to %20 rather than + in $message->to_url()
+	Fixed http://rt.cpan.org/Public/Bug/Display.html?id=44699 - encode spaces to %20 rather than + in $message->to_url()
 
-
+0.16   Mon, 15 Jun 2009 18:36:17 UTC
+  Added support for OAuth 1.0A - see POD section 'OAUTH 1.0A' for details - Net::OAuth still defaults to 1.0 for now

Modified: trunk/libnet-oauth-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-oauth-perl/MANIFEST?rev=38266&op=diff
==============================================================================
--- trunk/libnet-oauth-perl/MANIFEST (original)
+++ trunk/libnet-oauth-perl/MANIFEST Fri Jun 19 03:35:52 2009
@@ -13,13 +13,10 @@
 demos/twitter/config.yml
 demos/twitter/default.html
 demos/twitter/dispatch.cgi
-demos/twitter/ids.txt
-demos/twitter/ids2.txt
 demos/twitter/LICENSE.txt
 demos/twitter/oauth-demo.zip
 demos/twitter/OAuthDemo.pm
 demos/twitter/README.txt
-demos/twitter/toyota.xml
 demos/twitter/wrapper.html
 lib/Net/OAuth.pm
 lib/Net/OAuth/AccessTokenRequest.pm
@@ -36,6 +33,10 @@
 lib/Net/OAuth/SignatureMethod/RSA_SHA1.pm
 lib/Net/OAuth/UserAuthRequest.pm
 lib/Net/OAuth/UserAuthResponse.pm
+lib/Net/OAuth/V1_0A/AccessTokenRequest.pm
+lib/Net/OAuth/V1_0A/RequestTokenRequest.pm
+lib/Net/OAuth/V1_0A/RequestTokenResponse.pm
+lib/Net/OAuth/V1_0A/UserAuthResponse.pm
 Makefile.PL
 MANIFEST			This list of files
 META.yml
@@ -49,5 +50,6 @@
 t/07-consumer-request.t
 t/09-encoding.t
 t/10-misc.t
+t/11-spec-1.0a.t
 t/rsakey
 t/rsakey.pub

Modified: trunk/libnet-oauth-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-oauth-perl/META.yml?rev=38266&op=diff
==============================================================================
--- trunk/libnet-oauth-perl/META.yml (original)
+++ trunk/libnet-oauth-perl/META.yml Fri Jun 19 03:35:52 2009
@@ -1,6 +1,6 @@
 ---
 name: Net-OAuth
-version: 0.15
+version: 0.16
 author:
   - 'Keith Grennan <kgrennan at cpan.org>'
 abstract: An implementation of the OAuth protocol
@@ -17,7 +17,7 @@
 provides:
   Net::OAuth:
     file: lib/Net/OAuth.pm
-    version: 0.15
+    version: 0.16
   Net::OAuth::AccessTokenRequest:
     file: lib/Net/OAuth/AccessTokenRequest.pm
   Net::OAuth::AccessTokenResponse:
@@ -30,7 +30,7 @@
     file: lib/Net/OAuth/ProtectedResourceRequest.pm
   Net::OAuth::Request:
     file: lib/Net/OAuth/Request.pm
-    version: 0.15
+    version: 0.16
   Net::OAuth::RequestTokenRequest:
     file: lib/Net/OAuth/RequestTokenRequest.pm
   Net::OAuth::RequestTokenResponse:
@@ -47,6 +47,14 @@
     file: lib/Net/OAuth/UserAuthRequest.pm
   Net::OAuth::UserAuthResponse:
     file: lib/Net/OAuth/UserAuthResponse.pm
+  Net::OAuth::V1_0A::AccessTokenRequest:
+    file: lib/Net/OAuth/V1_0A/AccessTokenRequest.pm
+  Net::OAuth::V1_0A::RequestTokenRequest:
+    file: lib/Net/OAuth/V1_0A/RequestTokenRequest.pm
+  Net::OAuth::V1_0A::RequestTokenResponse:
+    file: lib/Net/OAuth/V1_0A/RequestTokenResponse.pm
+  Net::OAuth::V1_0A::UserAuthResponse:
+    file: lib/Net/OAuth/V1_0A/UserAuthResponse.pm
 generated_by: Module::Build version 0.2808
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.2.html

Modified: trunk/libnet-oauth-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-oauth-perl/debian/changelog?rev=38266&op=diff
==============================================================================
--- trunk/libnet-oauth-perl/debian/changelog (original)
+++ trunk/libnet-oauth-perl/debian/changelog Fri Jun 19 03:35:52 2009
@@ -1,8 +1,14 @@
-libnet-oauth-perl (0.15-2) UNRELEASED; urgency=low
+libnet-oauth-perl (0.16-1) unstable; urgency=low
 
-  * debian/watch: Update to ignore development releases.
+  * New upstream release
+  * debian/watch:
+    - Update to ignore development releases.
+    - Remove comments
+  * debian/control:
+    - Add myself to list of Uploaders
+    - Bump Standards-Version to 3.8.2
 
- -- Nathan Handler <nhandler at ubuntu.com>  Sat, 06 Jun 2009 01:36:39 +0000
+ -- Nathan Handler <nhandler at ubuntu.com>  Fri, 19 Jun 2009 03:35:34 +0000
 
 libnet-oauth-perl (0.15-1) unstable; urgency=low
 

Modified: trunk/libnet-oauth-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-oauth-perl/debian/control?rev=38266&op=diff
==============================================================================
--- trunk/libnet-oauth-perl/debian/control (original)
+++ trunk/libnet-oauth-perl/debian/control Fri Jun 19 03:35:52 2009
@@ -7,8 +7,9 @@
  libdigest-hmac-perl, libclass-accessor-perl, liburi-perl
 Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
 Uploaders: AGOSTINI Yves <agostini at univ-metz.fr>,
- gregor herrmann <gregoa at debian.org>, Brian Cassidy <brian.cassidy at gmail.com>
-Standards-Version: 3.8.1
+ gregor herrmann <gregoa at debian.org>, Brian Cassidy <brian.cassidy at gmail.com>,
+ Nathan Handler <nhandler at ubuntu.com>
+Standards-Version: 3.8.2
 Homepage: http://search.cpan.org/dist/Net-OAuth/
 Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libnet-oauth-perl/
 Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libnet-oauth-perl/

Modified: trunk/libnet-oauth-perl/debian/watch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-oauth-perl/debian/watch?rev=38266&op=diff
==============================================================================
--- trunk/libnet-oauth-perl/debian/watch (original)
+++ trunk/libnet-oauth-perl/debian/watch Fri Jun 19 03:35:52 2009
@@ -1,4 +1,2 @@
-# format version number, currently 3; this line is compulsory!
 version=3
-# URL to the package page followed by a regex to search
 http://search.cpan.org/dist/Net-OAuth/   .*/Net-OAuth-v?(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$

Modified: trunk/libnet-oauth-perl/demos/twitter/oauth-demo.zip
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-oauth-perl/demos/twitter/oauth-demo.zip?rev=38266&op=diff
==============================================================================
Binary files - no diff available.

Modified: trunk/libnet-oauth-perl/lib/Net/OAuth.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-oauth-perl/lib/Net/OAuth.pm?rev=38266&op=diff
==============================================================================
--- trunk/libnet-oauth-perl/lib/Net/OAuth.pm (original)
+++ trunk/libnet-oauth-perl/lib/Net/OAuth.pm Fri Jun 19 03:35:52 2009
@@ -3,8 +3,12 @@
 use strict;
 use UNIVERSAL::require;
 
-our $VERSION = '0.15';
+sub PROTOCOL_VERSION_1_0() {1}
+sub PROTOCOL_VERSION_1_0A() {1.001}
+
+our $VERSION = '0.16';
 our $SKIP_UTF8_DOUBLE_ENCODE_CHECK = 0;
+our $PROTOCOL_VERSION = PROTOCOL_VERSION_1_0;
 
 sub request {
     my $self = shift;
@@ -44,13 +48,14 @@
 
 =head1 SYNOPSIS
 
-	# Consumer sends Request Token Request
-
-	use Net::OAuth;
-	use HTTP::Request::Common;
-	my $ua = LWP::UserAgent->new;
-
-	my $request = Net::OAuth->request("request token")->new(
+    # Consumer sends Request Token Request
+
+    use Net::OAuth;
+    $Net::OAuth::PROTOCOL_VERSION = Net::OAuth::PROTOCOL_VERSION_1_0A;
+    use HTTP::Request::Common;
+    my $ua = LWP::UserAgent->new;
+
+    my $request = Net::OAuth->request("request token")->new(
         consumer_key => 'dpf43f3p2l4k3l03',
         consumer_secret => 'kd94hf93k423kf44',
         request_url => 'https://photos.example.net/request_token',
@@ -58,54 +63,57 @@
         signature_method => 'HMAC-SHA1',
         timestamp => '1191242090',
         nonce => 'hsu94j3884jdopsl',
-		extra_params => {
-			apple => 'banana',
-			kiwi => 'pear',
-		}
-	);
-
-	$request->sign;
-
-	my $res = $ua->request(POST $request->to_url); # Post message to the Service Provider
-	
-	if ($res->is_success) {
-		my $response = Net::OAuth->response('request token')->from_post_body($res->content);
-		print "Got Request Token ", $response->token, "\n";
-		print "Got Request Token Secret ", $response->token_secret, "\n";
-	}
-	else {
-		die "Something went wrong";
-	}
-	
-	# Etc..
-
-	# Service Provider receives Request Token Request
-	
-	use Net::OAuth;
-	use CGI;
-	my $q = new CGI;
-	
-	my $request = Net::OAuth->request("request token")->from_hash($q->Vars,
-		request_url => 'https://photos.example.net/request_token',
-		request_method => $q->request_method,
-		consumer_secret => 'kd94hf93k423kf44',
-	);
-
-	if (!$request->verify) {
-		die "Signature verification failed";
-	}
-	else {
-		# Service Provider sends Request Token Response
-
-		my $response = Net::OAuth->response("request token")->new( 
-			token => 'abcdef',
-			token_secret => '0123456',
-		);
-
-		print $response->to_post_body;
-	}	
-
-	# Etc..
+        callback => 'http://printer.example.com/request_token_ready',
+        extra_params => {
+            apple => 'banana',
+            kiwi => 'pear',
+        }
+    );
+
+    $request->sign;
+
+    my $res = $ua->request(POST $request->to_url); # Post message to the Service Provider
+
+    if ($res->is_success) {
+        my $response = Net::OAuth->response('request token')->from_post_body($res->content);
+        print "Got Request Token ", $response->token, "\n";
+        print "Got Request Token Secret ", $response->token_secret, "\n";
+    }
+    else {
+        die "Something went wrong";
+    }
+
+    # Etc..
+
+    # Service Provider receives Request Token Request
+
+    use Net::OAuth;
+    $Net::OAuth::PROTOCOL_VERSION = Net::OAuth::PROTOCOL_VERSION_1_0A;
+    use CGI;
+    my $q = new CGI;
+
+    my $request = Net::OAuth->request("request token")->from_hash($q->Vars,
+        request_url => 'https://photos.example.net/request_token',
+        request_method => $q->request_method,
+        consumer_secret => 'kd94hf93k423kf44',
+    );
+
+    if (!$request->verify) {
+        die "Signature verification failed";
+    }
+    else {
+        # Service Provider sends Request Token Response
+
+        my $response = Net::OAuth->response("request token")->new( 
+            token => 'abcdef',
+            token_secret => '0123456',
+            callback_confirmed => 'true',
+        );
+
+        print $response->to_post_body;
+    }    
+
+    # Etc..
 
 =head1 ABSTRACT
 
@@ -207,7 +215,7 @@
 
 When receiving a request, the Service Provider should first verify the signature:
 
- $request->verify;
+ die "Signature verification failed" unless $request->verify;
 
 When sending a message the last step is to serialize it and send it to wherever it needs to go.  The following serialization methods are available:
 
@@ -260,22 +268,22 @@
 
 Any query parameters in the request_url are removed and added to the extra_params hash when generating the signature.
 
-E.g. the following requests are equivalent:
-
-    my $request = Net::OAuth->request('user auth')->new(
-        token => 'abcdef',
-        request_url => 'http://example.com/auth',
-        extra_params => {
-                foo => 'bar',
-        },
-    );
-
-    my $request = Net::OAuth->request('user auth')->new(
-        token => 'abcdef',
-        request_url => 'http://example.com/auth?foo=bar',
-    );
-
-If you want to get the request_url with the query parameters removed, you can do:
+E.g. the following requests are pretty much equivalent:
+
+ my $request = Net::OAuth->request('Request Token')->new(
+  %params,
+  request_url => 'https://photos.example.net/request_token',
+  extra_params => {
+   foo => 'bar'
+  },
+);
+
+ my $request = Net::OAuth->request('Request Token')->new(
+  %params,
+  request_url => 'https://photos.example.net/request_token?foo=bar',
+ );
+
+Calling $request->request_url will still return whatever you set it to originally. If you want to get the request_url with the query parameters removed, you can do:
 
     my $url = $request->normalized_request_url;
 
@@ -353,33 +361,67 @@
 
 =head2 I18N
 
-Per the OAuth spec, when making the signature Net::OAuth first encodes
-parameters to UTF-8. This means that any parameters you pass to Net::OAuth,
-if they are outside of ASCII character set, should be run through
-Encode::decode() (or an equivalent PerlIO layer) first to decode them to
-perl's internal character sructure.
-
-There is a check in Net::OAuth's parameter encoding function that guesses if
-the data you are passing in looks like it is already UTF-8 and warns that you
-should decode it first. This accidental double-encoding of UTF-8 may be a
-source of headaches - if you find that the signature check is failing when
-you send non-ASCII data, that is a likely cause. 
+Per the OAuth spec, when making the signature Net::OAuth first encodes parameters to UTF-8. This means that any parameters you pass to Net::OAuth, if they are outside of ASCII character set, should be run through Encode::decode() (or an equivalent PerlIO layer) first to decode them to perl's internal character sructure.
+
+There is a check in Net::OAuth's parameter encoding function that guesses if the data you are passing in looks like it is already UTF-8 and warns that you should decode it first. This accidental double-encoding of UTF-8 may be a source of headaches - if you find that the signature check is failing when you send non-ASCII data, that is a likely cause. 
 
 You can silence this warning by setting:
 
     $Net::OAuth::SKIP_UTF8_DOUBLE_ENCODE_CHECK = 1;
 
-Following is an example of decoding some UTF-8 form data before sending it in
-an OAuth messaage (from the Twitter demo included in the Net::OAuth package):
-
-my $request = Net::OAuth->request("protected resource")->new(
-    $self->_default_request_params,
-    request_url => 'http://twitter.com/statuses/update.xml',
-    token => $self->session->param('token'),
-    token_secret => $self->session->param('token_secret'),
-    request_method => 'POST',
-    extra_params => {status => decode_utf8($self->query->param('status'))}
-);
+Following is an example of decoding some UTF-8 form data before sending it in an OAuth messaage (from the Twitter demo included in the Net::OAuth package):
+
+    my $request = Net::OAuth->request("protected resource")->new(
+        $self->_default_request_params,
+        request_url => 'http://twitter.com/statuses/update.xml',
+        token => $self->session->param('token'),
+        token_secret => $self->session->param('token_secret'),
+        request_method => 'POST',
+        extra_params => {status => decode_utf8($self->query->param('status'))}
+    );
+
+=head2 OAUTH 1.0A
+
+Background:
+
+L<http://mojodna.net/2009/05/20/an-idiots-guide-to-oauth-10a.html>
+
+L<http://oauth.googlecode.com/svn/spec/core/1.0a/drafts/3/oauth-core-1_0a.html>
+
+Net::OAuth defaults to OAuth 1.0 spec compliance, and supports OAuth 1.0 Rev A with an optional switch:
+
+ use Net::OAuth
+ $Net::OAuth::PROTOCOL_VERSION = Net::OAuth::PROTOCOL_VERSION_1_0A;
+
+It is recommended that any new projects use this switch if possible, and existing projects move to supporting this switch as soon as possible.  Probably the easiest way for existing projects to do this is to turn on the switch and run your test suite.  The Net::OAuth constructor will throw an exception where the new protocol parameters (callback, callback_confirmed, verifier) are missing.
+
+Internally, the Net::OAuth::Message constructor checks $Net::OAuth::PROTOCOL_VERSION and attempts to load the equivalent subclass in the Net::OAuth::V1_0A:: namespace.  So if you instantiate a Net::OAuth::RequestTokenRequest object, you will end up with a Net::OAuth::V1_0A::RequestTokenRequest (a subclass of Net::OAuth::RequestTokenRequest) if the protocol version is set to PROTOCOL_VERSION_1_0A.  You can also select a 1.0a subclass on a per-message basis by passing 
+    
+    protocol_version => Net::OAuth::PROTOCOL_VERSION_1_0A
+
+in the API parameters hash.
+
+If you are not sure whether the entity you are communicating with is 1.0A compliant, you can try instantiating a 1.0A message first and then fall back to 1.0 if that fails:
+
+    use Net::OAuth
+    $Net::OAuth::PROTOCOL_VERSION = Net::OAuth::PROTOCOL_VERSION_1_0A;
+    my $is_oauth_1_0 = 0;
+    my $response = eval{Net::OAuth->response('request token')->from_post_body($res->content)};
+    if ($@) {
+        if ($@ =~ /Missing required parameter 'callback_confirmed'/) {
+            # fall back to OAuth 1.0
+            $response = Net::OAuth->response('request token')->from_post_body(
+                $res->content, 
+                protocol_version => Net::OAuth::PROTOCOL_VERSION_1_0
+            );
+            $is_oauth_1_0 = 1; # from now on treat the server as OAuth 1.0 compliant
+        }
+        else {
+            die $@;
+        }
+    }
+
+At some point in the future, Net::OAuth will default to Net::OAuth::PROTOCOL_VERSION_1_0A.
 
 =head1 DEMO
 
@@ -389,13 +431,19 @@
 
 L<http://oauth.net>
 
+Check out L<Net::OAuth::Simple> - it has a simpler API that may be more to your liking
+
+Check out L<Net::Twitter::OAuth> for a Twitter-specific OAuth API
+
+Check out L<WWW::Netflix::API> for a Netflix-specific OAuth API
+
 =head1 AUTHOR
 
 Keith Grennan, C<< <kgrennan at cpan.org> >>
 
 =head1 COPYRIGHT & LICENSE
 
-Copyright 2007 Keith Grennan, all rights reserved.
+Copyright 2009 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.

Modified: trunk/libnet-oauth-perl/lib/Net/OAuth/Message.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-oauth-perl/lib/Net/OAuth/Message.pm?rev=38266&op=diff
==============================================================================
--- trunk/libnet-oauth-perl/lib/Net/OAuth/Message.pm (original)
+++ trunk/libnet-oauth-perl/lib/Net/OAuth/Message.pm Fri Jun 19 03:35:52 2009
@@ -52,10 +52,24 @@
     my $proto = shift;
     my $class = ref $proto || $proto;
     my %params = @_;
+    $class = get_versioned_class($class, \%params);
     my $self = bless \%params, $class;
     $self->set_defaults;
     $self->check;
     return $self;
+}
+
+sub get_versioned_class {
+    my $class = shift;
+    my $params = shift;
+    my $protocol_version = $params->{protocol_version} || $Net::OAuth::PROTOCOL_VERSION;
+    if (defined $protocol_version and $protocol_version == Net::OAuth::PROTOCOL_VERSION_1_0A) {
+        (my $versioned_class = $class) =~ s/::(\w+)$/::V1_0A::$1/;
+        if ($versioned_class->require) {
+            return $versioned_class;
+        }
+    }
+    return $class;
 }
 
 sub set_defaults {

Modified: trunk/libnet-oauth-perl/lib/Net/OAuth/ProtectedResourceRequest.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-oauth-perl/lib/Net/OAuth/ProtectedResourceRequest.pm?rev=38266&op=diff
==============================================================================
--- trunk/libnet-oauth-perl/lib/Net/OAuth/ProtectedResourceRequest.pm (original)
+++ trunk/libnet-oauth-perl/lib/Net/OAuth/ProtectedResourceRequest.pm Fri Jun 19 03:35:52 2009
@@ -1,9 +1,13 @@
 package Net::OAuth::ProtectedResourceRequest;
 use warnings;
 use strict;
-use base 'Net::OAuth::AccessTokenRequest';
+use base 'Net::OAuth::Request';
 
+__PACKAGE__->add_required_message_params(qw/token/);
+__PACKAGE__->add_required_api_params(qw/token_secret/);
 sub allow_extra_params {1}
+sub sign_message {1}
+
 
 =head1 NAME
 

Modified: trunk/libnet-oauth-perl/lib/Net/OAuth/Request.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-oauth-perl/lib/Net/OAuth/Request.pm?rev=38266&op=diff
==============================================================================
--- trunk/libnet-oauth-perl/lib/Net/OAuth/Request.pm (original)
+++ trunk/libnet-oauth-perl/lib/Net/OAuth/Request.pm Fri Jun 19 03:35:52 2009
@@ -5,7 +5,7 @@
 use URI;
 use URI::QueryParam;
 
-our $VERSION = '0.15';
+our $VERSION = '0.16';
 
 __PACKAGE__->mk_classdata(required_message_params => [qw/
     consumer_key
@@ -29,6 +29,7 @@
     signature_key
     token_secret
     extra_params
+    protocol_version
     /]);
 
 __PACKAGE__->mk_classdata(signature_elements => [qw/

Modified: trunk/libnet-oauth-perl/lib/Net/OAuth/RequestTokenResponse.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-oauth-perl/lib/Net/OAuth/RequestTokenResponse.pm?rev=38266&op=diff
==============================================================================
--- trunk/libnet-oauth-perl/lib/Net/OAuth/RequestTokenResponse.pm (original)
+++ trunk/libnet-oauth-perl/lib/Net/OAuth/RequestTokenResponse.pm Fri Jun 19 03:35:52 2009
@@ -8,7 +8,7 @@
 
 =head1 NAME
 
-Net::OAuth::RequestTokenResponse - An OAuth protocol response for an Access Token
+Net::OAuth::RequestTokenResponse - An OAuth protocol response for an Request Token
 
 =head1 SEE ALSO
 

Modified: trunk/libnet-oauth-perl/lib/Net/OAuth/Response.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-oauth-perl/lib/Net/OAuth/Response.pm?rev=38266&op=diff
==============================================================================
--- trunk/libnet-oauth-perl/lib/Net/OAuth/Response.pm (original)
+++ trunk/libnet-oauth-perl/lib/Net/OAuth/Response.pm Fri Jun 19 03:35:52 2009
@@ -15,6 +15,7 @@
 
 __PACKAGE__->mk_classdata(optional_api_params => [qw/
 	extra_params
+	protocol_version
 	/]);
 
 __PACKAGE__->mk_classdata(signature_elements => [qw/

Modified: trunk/libnet-oauth-perl/lib/Net/OAuth/UserAuthResponse.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-oauth-perl/lib/Net/OAuth/UserAuthResponse.pm?rev=38266&op=diff
==============================================================================
--- trunk/libnet-oauth-perl/lib/Net/OAuth/UserAuthResponse.pm (original)
+++ trunk/libnet-oauth-perl/lib/Net/OAuth/UserAuthResponse.pm Fri Jun 19 03:35:52 2009
@@ -2,6 +2,7 @@
 use warnings;
 use strict;
 use base 'Net::OAuth::Response';
+use Net::OAuth;
 
 sub allow_extra_params {1}
 

Modified: trunk/libnet-oauth-perl/t/01-spec.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-oauth-perl/t/01-spec.t?rev=38266&op=diff
==============================================================================
--- trunk/libnet-oauth-perl/t/01-spec.t (original)
+++ trunk/libnet-oauth-perl/t/01-spec.t Fri Jun 19 03:35:52 2009
@@ -2,11 +2,12 @@
 
 use strict;
 use warnings;
-use Test::More tests => 21;
+use Test::More tests => 20;
 
 BEGIN {
-        use_ok( 'Net::OAuth' );
-        use_ok( 'Net::OAuth::Request' );
+    use Net::OAuth;
+    $Net::OAuth::PROTOCOL_VERSION = Net::OAuth::PROTOCOL_VERSION_1_0;
+    use_ok( 'Net::OAuth::Request' );
 	use_ok( 'Net::OAuth::RequestTokenRequest' );
 	use_ok( 'Net::OAuth::AccessTokenRequest' );
 	use_ok( 'Net::OAuth::ProtectedResourceRequest' );

Modified: trunk/libnet-oauth-perl/t/04-response.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-oauth-perl/t/04-response.t?rev=38266&op=diff
==============================================================================
--- trunk/libnet-oauth-perl/t/04-response.t (original)
+++ trunk/libnet-oauth-perl/t/04-response.t Fri Jun 19 03:35:52 2009
@@ -5,6 +5,8 @@
 use Test::More tests => 5;
 
 BEGIN {
+    use Net::OAuth;
+    $Net::OAuth::PROTOCOL_VERSION = Net::OAuth::PROTOCOL_VERSION_1_0;
     use_ok( 'Net::OAuth::Response' );
     use_ok( 'Net::OAuth::RequestTokenResponse' );
     use_ok( 'Net::OAuth::AccessTokenResponse' );

Modified: trunk/libnet-oauth-perl/t/05-auth.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-oauth-perl/t/05-auth.t?rev=38266&op=diff
==============================================================================
--- trunk/libnet-oauth-perl/t/05-auth.t (original)
+++ trunk/libnet-oauth-perl/t/05-auth.t Fri Jun 19 03:35:52 2009
@@ -5,6 +5,8 @@
 use Test::More tests => 6;
 
 BEGIN {
+    use Net::OAuth;
+    $Net::OAuth::PROTOCOL_VERSION = Net::OAuth::PROTOCOL_VERSION_1_0;
     use_ok( 'Net::OAuth::Request' );
     use_ok( 'Net::OAuth::Response' );
     use_ok( 'Net::OAuth::UserAuthRequest' );

Modified: trunk/libnet-oauth-perl/t/06-factory.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-oauth-perl/t/06-factory.t?rev=38266&op=diff
==============================================================================
--- trunk/libnet-oauth-perl/t/06-factory.t (original)
+++ trunk/libnet-oauth-perl/t/06-factory.t Fri Jun 19 03:35:52 2009
@@ -1,9 +1,10 @@
 use strict;
 use warnings;
-use Test::More tests => 12;
+use Test::More tests => 11;
 
 BEGIN {
-    use_ok( 'Net::OAuth' );
+    use Net::OAuth;
+    $Net::OAuth::PROTOCOL_VERSION = Net::OAuth::PROTOCOL_VERSION_1_0;
 }
 
 my $request = Net::OAuth->request('user auth')->new(

Modified: trunk/libnet-oauth-perl/t/10-misc.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-oauth-perl/t/10-misc.t?rev=38266&op=diff
==============================================================================
--- trunk/libnet-oauth-perl/t/10-misc.t (original)
+++ trunk/libnet-oauth-perl/t/10-misc.t Fri Jun 19 03:35:52 2009
@@ -1,9 +1,10 @@
 use strict;
 use warnings;
-use Test::More tests => 5;
+use Test::More tests => 4;
 
 BEGIN {
-    use_ok( 'Net::OAuth' );
+    use Net::OAuth;
+    $Net::OAuth::PROTOCOL_VERSION = Net::OAuth::PROTOCOL_VERSION_1_0;
 }
 
 my $request = Net::OAuth->request('user auth')->new(




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