| 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
| |||||||||||
| 11 | 0 | $user->clear_oauth2; | |||||||||
| 12 | } else { | ||||||||||
| 13 | 1 | ▶ | $user->oauth2(undef) if $user->can('oauth2'); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 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 | ||||||||||