Changeset 1196 for lang/perl/Apache2-AuthenOpenID
- Timestamp:
- 11/06/07 23:33:22 (13 months ago)
- Location:
- lang/perl/Apache2-AuthenOpenID/trunk
- Files:
-
- 2 modified
-
Changes (modified) (1 diff)
-
lib/Apache2/AuthenOpenID.pm (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/Apache2-AuthenOpenID/trunk/Changes
r485 r1196 1 1 Revision history for Perl extension Apache2::AuthenOpenID. 2 2 3 0.03 Mon Oct 16 09:30:00 2007 4 - add identity check 5 3 6 0.02 Mon Oct 15 10:40:00 2007 4 - made HTML tidy7 - made HTML tidy 5 8 - modify variable names 6 9 - add configuration check 7 10 8 11 0.01 Sun Oct 14 09:30:07 2007 9 - original version; created by h2xs 1.23 with options10 -X -A Apache2::AuthenOpenID12 - original version; created by h2xs 1.23 with options 13 -X -A Apache2::AuthenOpenID 11 14 -
lang/perl/Apache2-AuthenOpenID/trunk/lib/Apache2/AuthenOpenID.pm
r485 r1196 17 17 use LWPx::ParanoidAgent; 18 18 19 our $VERSION = '0.0 2';19 our $VERSION = '0.03'; 20 20 21 21 my @directives = ( … … 55 55 if ($arg =~ /^OpenID$/i) { 56 56 Apache2::ServerUtil->server->push_handlers( 57 PerlAuthenHandler => \&handler57 PerlAuthenHandler => __PACKAGE__, 58 58 ); 59 59 } … … 78 78 } 79 79 80 sub handler { 81 my $r = shift; 82 80 sub handler : method { 81 my ($self, $r) = @_; 82 warn $self; 83 warn __PACKAGE__; 83 84 $r->auth_type =~ m{^OpenID$}i or return Apache2::Const::DECLINED; 84 85 … … 91 92 (my $cookie_name = __PACKAGE__."-".$r->auth_name) =~ s/(::|\s+)/-/g; 92 93 my $cookie_dest_name = $cookie_name.'-destination'; 93 &set_custom_response($r);94 $self->set_custom_response($r); 94 95 95 96 $r->err_headers_out->set('Pragma' => 'no-chache'); … … 113 114 if ($request_url eq $cf->{'return_to'}) { 114 115 if (my $identity = $q->param('identity')) { 115 my $claimed_identity = $csr->claimed_identity($identity); 116 my $claimed_identity = $csr->claimed_identity($identity) 117 or return Apache2::Const::HTTP_UNAUTHORIZED; 116 118 my $check_url = $claimed_identity->check_url( 117 119 return_to => $cf->{'return_to'}, … … 129 131 $url =~ s{(^https?://|/$)}{}g; 130 132 my $time = time(); 131 my $token = &calc_token($url, $time, $cf->{'consumer_secret'});133 my $token = $self->calc_token($url, $time, $cf->{'consumer_secret'}); 132 134 my $cookie_out = CGI::Cookie->new( 133 135 -name => $cookie_name, … … 153 155 if (%cookie_in && $cookie_in{$cookie_name}){ 154 156 my ($url, $time, $token) = $cookie_in{$cookie_name}->value; 155 if ( &calc_token($url, $time, $cf->{'consumer_secret'}) eq $token) {157 if ($self->calc_token($url, $time, $cf->{'consumer_secret'}) eq $token) { 156 158 $r->user($url); 157 159 return Apache2::Const::OK; … … 170 172 171 173 sub set_custom_response { 174 my $self = shift; 172 175 my $r = shift; 173 176 my $cf = Apache2::Module::get_config(__PACKAGE__, $r->server);
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)