| 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
| |||||||||||
| 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 | ||||||||||