NAME

Amon2::Auth::Site::LINE - LINE integration for Amon2

SYNOPSIS

# in your configuration file

+{
    Auth => {
        LINE => {
            client_id     => '123456789Z',,
            client_secret => '01234567889abcdef0123456789abcdx',
            scope         => [qw(profile)],
        }
    }
}

# in your web app

__PACKAGE__->load_plugin('Web::Auth', {
    module => 'LINE',
    on_finished => sub {
        my($c, $token, $api_response) = @_;
        my $user_id = $api_response->{userId};
        my $name    = $api_response->{displayName};
        $c->session->set(user_id => $user_id);
        $c->session->set(name    => $name);
        return $c->redirect('/');
    },
    on_error => sub {
        my($c, $error_message) = @_;
        ...
    }
});

DESCRIPTION

This is a LINE Login authentication module for Amon2. It uses LINE Login v2.1 APIs.

ATTRIBUTES FOR CONFIGURATION FILE

Following attributes are set in your configuration file such like config/production.pl and so on.

ATTRIBUTES FOR ARGUMENT

METHODS

AUTHOR

Koichi Taniguchi (a.k.a. nipotan) taniguchi@cpan.org

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO