Amon2-Auth-Site-Google

 view release on metacpan or  search on metacpan

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

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

    my $uri = URI->new($self->authorize_url);
    $uri->query_form(+{
        client_id       => $self->client_id,
        scope           => $self->scope,
        redirect_uri    => $callback_uri,
        response_type   => 'code',
        access_type     => 'offline',
        approval_prompt => 'force',
    });
    return $uri->as_string;
}

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

    my $res = $self->ua->post($self->token_url, +{
        client_id     => $self->client_id,
        client_secret => $self->client_secret,



( run in 1.089 second using v1.01-cache-2.11-cpan-6aa56a78535 )