Changeset 2966
- Timestamp:
- 12/10/07 13:21:08 (5 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/Net-OAuth-Consumer/lib/Net/OAuth/Consumer.pm
r2965 r2966 24 24 25 25 __PACKAGE__->mk_accessors(qw( 26 query 26 27 ua 28 nonce 27 29 consumer_key 28 30 consumer_secret 29 31 request_token_url 30 32 access_token_url 33 authorization_url 31 34 request_token 32 35 access_token … … 38 41 unless ($self->ua) { 39 42 $self->ua(LWP::UserAgent->new( 40 agent => " Net-OAuth-Client/$VERSION",43 agent => "Perl-Net-OAuth-Consumer/$VERSION", 41 44 )); 42 45 } 43 46 unless ($self->nonce) { 44 $self->nonce(\& nonce);47 $self->nonce(\&_nonce); 45 48 } 46 49 return $self; 47 50 } 48 51 49 sub nonce {52 sub _nonce { 50 53 return String::Random->new->randregex("[a-zA-Z0-9]{32}"); 51 54 } … … 71 74 ); 72 75 return $self->request_token; 76 } 77 78 sub authorize { 79 my ($self, $args) = @_; 80 my $token = $args->{oauth_token} || $self->request_token->oauth_token; 81 print $self->query->redirect($self->authorization_url.'?oauth_token='.$token); 73 82 } 74 83
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)