CatalystX/OAuth2/ClientPersistor.pm

filter: Statementstmt 90.0% 9 / 10 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 81.2% 13 / 16 SCAR 11.3
CC
3
Cov
79%
__ANON__
3.5
BEGIN
1.0
CRAP 3.1
« CatalystX/OAuth2/Controller/Role/Provider.pm ↑ Summary CatalystX/OAuth2/Request/RefreshToken.pm »
1 package CatalystX::OAuth2::ClientPersistor;
2 3 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 # ABSTRACT: Work-around for persisting oauth2-authenticated users safely
5  
6 3 requires qw(for_session);
7  
8 after for_session => sub {
9 1 ▶ my ( $self, $c, $user ) = @_;
Subroutine __ANON__: called CC=3 SCAR=12.5
10 1 ▶ if ( $user->Moose::Util::does_role('CatalystX::OAuth2::ClientContainer') ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($user->Moose::Util::does_role('CatalystX::OAuth2::ClientContainer')) { } 0 1 1
11 0 $user->clear_oauth2;
12 } else {
13 1 ▶ $user->oauth2(undef) if $user->can('oauth2');
Branch: 1 branch
BranchTrueFalseTotal
if $user->can("oauth2") 1 0 1
14 }
15 3 };
16  
17 3 1;
18  
19 __END__
20  
21 =pod
22  
23 =head1 NAME
24  
25 CatalystX::OAuth2::ClientPersistor - Work-around for persisting oauth2-authenticated users safely
26  
27 =head1 VERSION
28  
29 version 0.001006
30  
31 =head1 AUTHOR
32  
33 Eden Cardim <edencardim@gmail.com>
34  
35 =head1 COPYRIGHT AND LICENSE
36  
37 This software is copyright (c) 2017 by Suretec Systems Ltd.
38  
39 This is free software; you can redistribute it and/or modify it under
40 the same terms as the Perl 5 programming language system itself.
41  
42 =cut
« CatalystX/OAuth2/Controller/Role/Provider.pm ↑ Summary CatalystX/OAuth2/Request/RefreshToken.pm »