line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::PMP::Credentials; |
2
|
3
|
|
|
3
|
|
18
|
use Moose; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
15
|
|
3
|
3
|
|
|
3
|
|
15508
|
use Carp; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
148
|
|
4
|
3
|
|
|
3
|
|
16
|
use Data::Dump qw( dump ); |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
251
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
has 'token_expires_in' => ( is => 'ro', isa => 'Int', required => 1, ); |
7
|
|
|
|
|
|
|
has 'client_id' => ( is => 'ro', isa => 'Str', required => 1, ); |
8
|
|
|
|
|
|
|
has 'client_secret' => ( is => 'ro', isa => 'Str', required => 1, ); |
9
|
|
|
|
|
|
|
has 'label' => ( is => 'ro', isa => 'Str', required => 1, ); |
10
|
|
|
|
|
|
|
has 'scope' => ( is => 'ro', isa => 'Str', required => 1, ); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 NAME |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
Net::PMP::Credentials - PMP credentials object |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=head1 SYNOPSIS |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
my $credentials = $pmp_client->create_credentials( |
19
|
|
|
|
|
|
|
username => 'i-am-a-user', |
20
|
|
|
|
|
|
|
password => 'secret-phrase-here', |
21
|
|
|
|
|
|
|
scope => 'read', |
22
|
|
|
|
|
|
|
expires => 86400, |
23
|
|
|
|
|
|
|
label => 'pmp ftw!', |
24
|
|
|
|
|
|
|
); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=head1 DESCRIPTION |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
Net::PMP::Credentials represents a PMP API credentials object. |
29
|
|
|
|
|
|
|
See L<https://github.com/publicmediaplatform/pmpdocs/wiki/Authentication-Model#client-credentials-management>. |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 METHODS |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head2 token_expires_in |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head2 client_id |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head2 client_secret |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head2 label |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head2 scope |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=cut |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
1; |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
__END__ |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 AUTHOR |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Peter Karman, C<< <karman at cpan.org> >> |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 BUGS |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Please report any bugs or feature requests to C<bug-net-pmp at rt.cpan.org>, or through |
56
|
|
|
|
|
|
|
the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-PMP>. I will be notified, and then you'll |
57
|
|
|
|
|
|
|
automatically be notified of progress on your bug as I make changes. |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 SUPPORT |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
perldoc Net::PMP::CollectionDoc |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
You can also look for information at: |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=over 4 |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=item * RT: CPAN's request tracker (report bugs here) |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Net-PMP> |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=item * AnnoCPAN: Annotated CPAN documentation |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
L<http://annocpan.org/dist/Net-PMP> |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=item * CPAN Ratings |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
L<http://cpanratings.perl.org/d/Net-PMP> |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=item * Search CPAN |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
L<http://search.cpan.org/dist/Net-PMP/> |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=back |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
American Public Media and the Public Media Platform sponsored the development of this module. |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
Copyright 2013 American Public Media Group |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
See the LICENSE file that accompanies this module. |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=cut |