Amon2-Auth-Site-LINE

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

        session key during authentication. Default values
        "line_login_state".

    nonce_session_key
        Optional. "nonce" parameter is kept on session with this specified
        session key during. Default values "line_login_nonce".

ATTRIBUTES FOR ARGUMENT
    authenticate_path
        Optional. Default value is "/auth/line/authenticate". The path works
        for "login link".

    callback_path
        Optional. Default value is "/auth/line/callback".

    on_finished
        Mandatory. The details are described following.

    on_error
        Optional. The details are described following.

    user_info
        Optional. If it's true, this module fetches the user information
        after authentication.

METHODS
    "$auth->auth_uri($c:Amon2::Web, $callback_uri : Str) :Str"
        Get a authenticate URI.

    "$auth->callback($c:Amon2::Web, $callback:HashRef) : Plack::Response"
        Process the authentication callback dispatching.

        $callback MUST have two keys.

        on_error
            on_error callback function is called when an error occurs.

            The arguments are following:

                sub {
                    my ($c, $error_message) = @_;
                    ...
                }

        on_finished
            on_finished callback function is called if an authentication was
            finished.ck function is called After successful authentication.

            The arguments are following:

                sub {
                    my ($c, $access_token, $api_response) = @_;
                    ...
                }

            $api_response contains an issued access token, a verified access
            token validity, and a gotten user profile. And they are all
            merged into one hash-ref. This code contains a information like
            <https://developers.line.biz/en/reference/line-login/#issue-toke
            n-response>,
            <https://developers.line.biz/en/reference/line-login/#verify-acc
            ess-token-response> and
            <https://developers.line.biz/en/reference/line-login/#get-profil
            e-response>. If you set "$auth->user_info" as a false value
            and/or you don't set "profile" as the "scope" attribute,
            authentication engine does not pass a gotten user profile.

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
    *   LINE Login v2.1 API Reference

        <https://developers.line.biz/en/reference/line-login/>

    *   Amon2::Plugin::Web::Auth

        Amon2::Plugin::Web::Auth



( run in 0.796 second using v1.01-cache-2.11-cpan-5735350b133 )