Permalink
Browse files

Checking in changes prior to tagging of version 0.03. Changelog diff is:

=== Changes
==================================================================
--- Changes	(revision 6647)
+++ Changes	(local)
@@ -1,5 +1,11 @@
 Revision history for Perl extension Catalyst::Plugin::Authentication::Credential::OpenID
 
+0.03  Fri Oct 26 13:22:10 PDT 2007
+        - Removed t/9*.t from MANIFEST since they're never supposed to be shipped
+          (Thanks to rjbs)
+        - Accepts URI as an authenticate_openid()'s 2nd parameter so
+          you can use parameter name other than "claimed_uri".
+
 0.02  Wed May  2 17:05:02 PDT 2007
         - Added delayed_return => 1 to work with claimid.com
           (Thanks to Marcus Ramberg for the report)
  • Loading branch information...
1 parent fce85c2 commit 49654ebd2f3e9ce1b4d7af7c369e2bc6fe051dac @miyagawa committed Oct 26, 2007
Showing with 21 additions and 8 deletions.
  1. +6 −0 Changes
  2. +1 −3 MANIFEST
  3. +1 −1 MANIFEST.SKIP
  4. +13 −4 lib/Catalyst/Plugin/Authentication/Credential/OpenID.pm
View
@@ -1,5 +1,11 @@
Revision history for Perl extension Catalyst::Plugin::Authentication::Credential::OpenID
+0.03 Fri Oct 26 13:22:10 PDT 2007
+ - Removed t/9*.t from MANIFEST since they're never supposed to be shipped
+ (Thanks to rjbs)
+ - Accepts URI as an authenticate_openid()'s 2nd parameter so
+ you can use parameter name other than "claimed_uri".
+
0.02 Wed May 2 17:05:02 PDT 2007
- Added delayed_return => 1 to work with claimid.com
(Thanks to Marcus Ramberg for the report)
View
@@ -1,3 +1,4 @@
+.shipit
Changes
inc/Module/Install.pm
inc/Module/Install/Base.pm
@@ -21,6 +22,3 @@ MANIFEST This list of files
META.yml
README
t/00_compile.t
-t/97_podspell.t
-t/98_perlcritic.t
-t/99_pod.t
View
@@ -9,4 +9,4 @@
^MakeMaker-\d
\.gz$
\.cvsignore
-^9\d_.*\.t
+^t/9\d_.*\.t
@@ -2,7 +2,7 @@ package Catalyst::Plugin::Authentication::Credential::OpenID;
use strict;
use warnings;
-our $VERSION = '0.02';
+our $VERSION = '0.03';
use Net::OpenID::Consumer;
use LWPx::ParanoidAgent;
@@ -17,7 +17,7 @@ sub setup {
}
sub authenticate_openid {
- my($c) = @_;
+ my($c, $uri) = @_;
my $config = $c->config->{authentication}->{openid};
@@ -27,7 +27,8 @@ sub authenticate_openid {
consumer_secret => sub { $_[0] },
);
- if (my $uri = $c->req->param('claimed_uri')) {
+ my @try_params = qw( openid_url openid_identifier claimed_uri );
+ if ($uri ||= (grep defined, @{$c->req->params}{@try_params})[0]) {
my $current = $c->req->uri;
$current->query(undef); # no query
my $identity = $csr->claimed_identity($uri)
@@ -83,6 +84,7 @@ __END__
plugins
rss
url
+ URI
=head1 NAME
@@ -120,7 +122,7 @@ Catalyst::Plugin::Authentication::Credential::OpenID - OpenID credential for Cat
# foo.tt
<form action="[% c.uri_for('/signin_openid') %]" method="GET">
- <input type="text" name="claimed_uri" class="openid" />
+ <input type="text" name="openid_url" class="openid" />
<input type="submit" value="Sign in with OpenID" />
</form>
@@ -145,6 +147,13 @@ User class specified with I<user_class> config, which defaults to
Catalyst::Plugin::Authentication::User::Hash, will be instantiated
with the following parameters.
+By default, L<authenticate_openid> method looks for claimed URI
+parameter from the form field named C<openid_url>,
+C<openid_identifier> or C<claimed_uri>. If you want to use another
+form field name, call it like:
+
+ $c->authenticate_openid( $c->req->param('myopenid_param') );
+
=over 8
=item url

0 comments on commit 49654eb

Please sign in to comment.