Catalyst::Plugin::Authentication::Credential::Hatena - Hatena authentication for Catalyst
# load plugin and setup use Catalyst qw( Authentication Authentication::Credential::Hatena Session Session::Store::FastMmap Session::State::Cookie ); __PACKAGE__->config->{authentication}->{hatena} = { api_key => 'your api_key', secret => 'your shared secret', }; # in controller # redirect login url sub login : Path('/hatena/login') { my ( $self, $c ) = @_; $c->res->redirect( $c->authenticate_hatena_url ); } # callback url sub auth : Path('/hatena/auth') { my ( $self, $c ) = @_; if ( $c->authenticate_hatena ) { # login successful $c->res->redirect( $c->uri_for('/') ); } else { # something wrong } }
This module provide authentication via Hatena, using its api.
Hatena::API::Auth, http://auth.hatena.ne.jp/
Daisuke Murase <typester@cpan.org>
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
To install Catalyst::Plugin::Authentication::Credential::Hatena, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catalyst::Plugin::Authentication::Credential::Hatena
CPAN shell
perl -MCPAN -e shell install Catalyst::Plugin::Authentication::Credential::Hatena
For more information on module installation, please visit the detailed CPAN module installation guide.