Amon2-Auth

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

    Date:   Wed Jan 14 06:49:47 2015 +0000

        Support Plack::App::URLMap

0.05 2014-09-02T21:11:33Z

    commit 46b0793d23a3de9789ae35b6d0471123a09e34dc
    Author: Wataru TOYA <watrty@gmail.com>
    Date:   Tue Sep 2 15:53:22 2014 +0900

        use ssl connection to twitter

0.04 2014-05-04T23:49:06Z

    commit 90629cc8584f593c28dd9a3e31ec715e11c887f1
    Author: Kenta Kase <kesin1202000@gmail.com>
    Date:   Sun May 4 16:53:15 2014 +0900

        Support Twitter API v1.1

        Change Net::Twitter::Lite to Net::Twitter::Lite::WithAPIv1_1

LICENSE  view on Meta::CPAN


Source code for a work means the preferred form of the work for making
modifications to it.  For an executable file, complete source code means
all the source code for all modules it contains; but, as a special
exception, it need not include source code for modules which are standard
libraries that accompany the operating system on which the executable
file runs, or for standard header files or definitions files that
accompany that operating system.

  4. You may not copy, modify, sublicense, distribute or transfer the
Program except as expressly provided under this General Public License.
Any attempt otherwise to copy, modify, sublicense, distribute or transfer
the Program is void, and will automatically terminate your rights to use
the Program under this License.  However, parties who have received
copies, or rights to use copies, from you under this General Public
License will not have their licenses terminated so long as such parties
remain in full compliance.

  5. By copying, distributing or modifying the Program (or any work based
on the Program) you indicate your acceptance of this license to do so,
and all its terms and conditions.

lib/Amon2/Auth/Site/Twitter.pm  view on Meta::CPAN

	is => 'ro',
	isa => 'Str',
	required => 1,
);

sub _nt {
	my ($self) = @_;
    my $nt = Net::Twitter::Lite::WithAPIv1_1->new(
        consumer_key    => $self->consumer_key,
        consumer_secret => $self->consumer_secret,
        ssl             => 1,
    );
	return $nt;
}

sub auth_uri {
	my ($self, $c, $callback_uri) = @_;

	my $nt = $self->_nt();
	my $redirect_uri = $nt->get_authorization_url(callback => $callback_uri);
    $c->session->set( auth_twitter => [ $nt->request_token, $nt->request_token_secret, ] );



( run in 0.550 second using v1.01-cache-2.11-cpan-acf6aa7dc9e )