lib/OAuthomatic/OAuthInteraction/ViaMicroWeb.pm

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