Hello, I have started using Net::OAuth to create
Catalyst::Authentication::Credential::OAuth. It goes nicely, except that
today I ran into some problems with Yahoo's OAuth.
Apparently in the response to the request for token endpoint:
my %defaults = (
consumer_key => $provider->{consumer_key},
consumer_secret => $provider->{consumer_secret},
timestamp => time,
nonce => random_string( 'ccccccccccccccccccc' ),
request_method => 'GET',
signature_method => 'HMAC-SHA1',
callback => $c->uri_for( $c->action, $c->req->captures, @{
$c->req->args } )->as_string
);
my $request = Net::OAuth->request( 'request token' )->new(
%defaults,
request_url => $provider->{request_token_endpoint}
);
$request->sign;
my $ua_response = $self->ua->request( GET $request->to_url );
$response = Net::OAuth->response( 'access token' )->from_post_body(
$ua_response->content );
Yahoo adds in his own oauth_expires_in=3600:
'_content' => 'oauth_token=123
&oauth_token_secret=123
&oauth_expires_in=3600
&xoauth_request_auth_url=https%3A%2F%2Fapi.login.yahoo.com%2Foauth%2Fv2%2Frequest_auth%3Foauth_token%3Dhwvkr2f&oauth_callback_confirmed=true',
I tried adding oauth_expires_in in optional_message_params, but to no
success, I'll probably play around with it more tomorrow and also send
you a patch if I can make it work.