Synopsis
# config
Auth => {
Hatena => {
consumer_key => 'your consumer key',
consumer_secret => 'your consumer secret',
}
}
# app
__PACKAGE__->load_plugin('Web::Auth', {
module => 'Hatena',
on_error => sub {
my ($c, $error_message) = @_;
die $error_message;
},
on_finished => sub {
my ($c, $token, $token_secret, $user) = @_;
$c->session->set(auth_hatena => {
user => $user,
token => $token,
token_secret => $token_secret,
});
$c->redirect('/');
},
});
Description
Amon2::Auth handler for Hatena auth (Hatena OAuth Spec.).
It might be better for the code to be directly in Amon2::Auth distribution. Should I send a pull-req rather than creating such an independent distribution? > @tokuhirom
- TODO
- tests (but, what the best practice on that kind of test?)
- document

Comments
Please sign up to post a review.