line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CatalystX::OAuth2::ActionRole::RequestInjector; |
2
|
8
|
|
|
8
|
|
7011
|
use Moose::Role; |
|
8
|
|
|
|
|
35
|
|
|
8
|
|
|
|
|
76
|
|
3
|
8
|
|
|
8
|
|
58576
|
use Moose::Util; |
|
8
|
|
|
|
|
31
|
|
|
8
|
|
|
|
|
84
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
# ABSTRACT: A role for injecting oauth2 logic into a catalyst request object |
6
|
|
|
|
|
|
|
|
7
|
8
|
|
|
8
|
|
6456
|
use CatalystX::OAuth2::Request; |
|
8
|
|
|
|
|
39
|
|
|
8
|
|
|
|
|
1145
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
requires 'execute'; |
10
|
|
|
|
|
|
|
requires 'build_oauth2_request'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
before execute => sub { |
13
|
|
|
|
|
|
|
my $self = shift; |
14
|
|
|
|
|
|
|
my ( $controller, $c ) = @_; |
15
|
|
|
|
|
|
|
my $req = $c->req; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
Moose::Util::ensure_all_roles( $req, 'CatalystX::OAuth2::Request', |
18
|
|
|
|
|
|
|
{ rebless_params => { oauth2 => $self->build_oauth2_request(@_) } } ); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
}; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
1; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
__END__ |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=pod |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 NAME |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
CatalystX::OAuth2::ActionRole::RequestInjector - A role for injecting oauth2 logic into a catalyst request object |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 VERSION |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
version 0.001007 |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 AUTHOR |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
Eden Cardim <edencardim@gmail.com> |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
This software is copyright (c) 2017 by Suretec Systems Ltd. |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
45
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=cut |