CatalystX/OAuth2/ActionRole/Grant.pm

filter: Statementstmt 100% 10 / 10 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 14 / 14 SCAR 6.9
CC
2
Cov
100%
__ANON__
2.0
BEGIN
1.0
CRAP 2.0
« CatalystX/OAuth2.pm ↑ Summary CatalystX/OAuth2/Schema/Result/Token.pm »
1 package CatalystX::OAuth2::ActionRole::Grant;
2 11 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 # ABSTRACT: Integrate an action with an oauth2 request
5  
6 11 with 'CatalystX::OAuth2::ActionRole::RequestInjector';
7  
8 after execute => sub {
9 17 ▶ my($self, $controller, $c) = @_;
Subroutine __ANON__: called CC=2 SCAR=6.9
10 17 ▶ return unless $c->req->oauth2->has_approval;
Branch: 1 branch
BranchTrueFalseTotal
unless $c->req->oauth2->has_approval 5 12 17
11 12 my $uri = $c->req->oauth2->next_action_uri($controller, $c);
12 12 $c->res->redirect($uri);
13 11 };
14  
15 11 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
« CatalystX/OAuth2.pm ↑ Summary CatalystX/OAuth2/Schema/Result/Token.pm »