File Coverage

blib/lib/CatalystX/OAuth2/ClientPersistor.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::ClientPersistor;
2 2     2   1498 use Moose::Role;
  2         6  
  2         20  
3              
4             # ABSTRACT: Work-around for persisting oauth2-authenticated users safely
5              
6             requires qw(for_session);
7              
8             after for_session => sub {
9             my ( $self, $c, $user ) = @_;
10             if ( $user->Moose::Util::does_role('CatalystX::OAuth2::ClientContainer') ) {
11             $user->clear_oauth2;
12             } else {
13             $user->oauth2(undef) if $user->can('oauth2');
14             }
15             };
16              
17             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