lib/OAuthomatic/OAuthInteraction/ViaMicroWeb.pm

filter: Statementstmt 71.4% 15 / 21 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 4 / 6 Podpod 0.0% 0 / 2 totaltotal 65.5% 19 / 29 CC 1 SCAR 2.9
CC
1
Cov
71%
prepare_to_work
2.0
cleanup_after_work
2.0
BEGIN
1.0
CRAP 1.3
« blib/script/oauthomatic_forget_tokens.pl ↑ Summary lib/OAuthomatic/ServerDef/BitBucket.pm »
1 package OAuthomatic::OAuthInteraction::ViaMicroWeb;
2 # ABSTRACT: Handling oauth callback via embedded web server
3  
4  
5  
6 3 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 3 ▶use namespace::sweep;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 3 ▶use Proc::Background;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 3 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11  
12 3 has 'micro_web' => (is=>'ro', isa=>'OAuthomatic::Internal::MicroWeb', required=>1,
13 handles => [ 'callback_url', 'wait_for_oauth_grant' ]);
14  
15 sub prepare_to_work {
16 0 ▶ my $self = shift;
Subroutine prepare_to_work: not called CC=1 SCAR=6.9
Pod undocumented
17 0 $self->micro_web->start_using;
18 0 return;
19 }
20  
21 sub cleanup_after_work {
22 0 ▶ my $self = shift;
Subroutine cleanup_after_work: not called CC=1 SCAR=6.9
Pod undocumented
23 0 $self->micro_web->finish_using;
24 0 return;
25 }
26  
27 3 with 'OAuthomatic::OAuthInteraction';
28  
29 3 1;
30  
31 __END__
32  
33 =pod
34  
35 =encoding UTF-8
36  
37 =head1 NAME
38  
39 OAuthomatic::OAuthInteraction::ViaMicroWeb - Handling oauth callback via embedded web server
40  
41 =head1 VERSION
42  
43 version 0.0201
44  
45 =head1 DESCRIPTION
46  
47 This module uses in-process web server to handle callback after OAuth permission
48 is granted. Used as default implementation of C<oauth_interaction> plugin
49 of L<OAuthomatic>.
50  
51 =head1 PARAMETERS
52  
53 =head2 micro_web
54  
55 Embedded web server object. Here it will be used to handle OAuth callback and display
56 minimal info to the user afterwards.
57  
58 =head1 AUTHOR
59  
60 Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
61  
62 =head1 COPYRIGHT AND LICENSE
63  
64 This software is copyright (c) 2015 by Marcin Kasperski.
65  
66 This is free software; you can redistribute it and/or modify it under
67 the same terms as the Perl 5 programming language system itself.
68  
69 =cut
« blib/script/oauthomatic_forget_tokens.pl ↑ Summary lib/OAuthomatic/ServerDef/BitBucket.pm »