File Coverage

blib/lib/CatalystX/OAuth2/ActionRole/Grant.pm
Criterion Covered Total %
statement 3 3 100.0
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 4 4 100.0


line stmt bran cond sub pod time code
1             package CatalystX::OAuth2::ActionRole::Grant;
2 8     8   5288 use Moose::Role;
  8         25  
  8         77  
3              
4             # ABSTRACT: Integrate an action with an oauth2 request
5              
6             with 'CatalystX::OAuth2::ActionRole::RequestInjector';
7              
8             after execute => sub {
9             my($self, $controller, $c) = @_;
10             return unless $c->req->oauth2->has_approval;
11             my $uri = $c->req->oauth2->next_action_uri($controller, $c);
12             $c->res->redirect($uri);
13             };
14              
15             1;
16              
17             __END__
18              
19             =pod
20              
21             =head1 NAME
22              
23             CatalystX::OAuth2::ActionRole::Grant - Integrate an action with an oauth2 request
24              
25             =head1 VERSION
26              
27             version 0.001006
28              
29             =head1 AUTHOR
30              
31             Eden Cardim <edencardim@gmail.com>
32              
33             =head1 COPYRIGHT AND LICENSE
34              
35             This software is copyright (c) 2017 by Suretec Systems Ltd.
36              
37             This is free software; you can redistribute it and/or modify it under
38             the same terms as the Perl 5 programming language system itself.
39              
40             =cut