line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package OAuth::Lite2::Model::AccessToken; |
2
|
|
|
|
|
|
|
|
3
|
17
|
|
|
17
|
|
20651
|
use strict; |
|
17
|
|
|
|
|
21
|
|
|
17
|
|
|
|
|
367
|
|
4
|
17
|
|
|
17
|
|
48
|
use warnings; |
|
17
|
|
|
|
|
17
|
|
|
17
|
|
|
|
|
315
|
|
5
|
|
|
|
|
|
|
|
6
|
17
|
|
|
17
|
|
53
|
use base 'Class::Accessor::Fast'; |
|
17
|
|
|
|
|
14
|
|
|
17
|
|
|
|
|
1428
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors(qw( |
9
|
|
|
|
|
|
|
auth_id |
10
|
|
|
|
|
|
|
token |
11
|
|
|
|
|
|
|
expires_in |
12
|
|
|
|
|
|
|
secret |
13
|
|
|
|
|
|
|
secret_type |
14
|
|
|
|
|
|
|
created_on |
15
|
|
|
|
|
|
|
)); |
16
|
|
|
|
|
|
|
|
17
|
17
|
|
|
17
|
|
2345
|
use Params::Validate; |
|
17
|
|
|
|
|
5836
|
|
|
17
|
|
|
|
|
2002
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub new { |
20
|
16
|
|
|
16
|
1
|
385
|
my $class = shift; |
21
|
16
|
100
|
|
|
|
37
|
my @args = @_ == 1 ? %{$_[0]} : @_; |
|
15
|
|
|
|
|
45
|
|
22
|
16
|
|
|
|
|
381
|
my %params = Params::Validate::validate_with( |
23
|
|
|
|
|
|
|
params => \@args, |
24
|
|
|
|
|
|
|
spec => { |
25
|
|
|
|
|
|
|
auth_id => 1, |
26
|
|
|
|
|
|
|
token => 1, |
27
|
|
|
|
|
|
|
expires_in => { optional => 1 }, |
28
|
|
|
|
|
|
|
created_on => { optional => 1 }, |
29
|
|
|
|
|
|
|
secret => { optional => 1 }, |
30
|
|
|
|
|
|
|
secret_type => { optional => 1 }, |
31
|
|
|
|
|
|
|
}, |
32
|
|
|
|
|
|
|
allow_extra => 1, |
33
|
|
|
|
|
|
|
); |
34
|
16
|
|
|
|
|
83
|
my $self = bless \%params, $class; |
35
|
16
|
|
|
|
|
36
|
return $self; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 NAME |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
OAuth::Lite2::Model::AccessToken - model class that represents access token |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 ACCESSORS |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head2 auth_id |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
Identifier of L. |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head2 token |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Access token string. |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head2 expires_in |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Seconds to expires from 'created_on' |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head2 created_on |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
UNIX time when access token created. |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head2 secret |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
DEPRECATED. |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head2 secret_type |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
DEPRECATED. |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 AUTHOR |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
Lyo Kato, Elyo.kato@gmail.comE |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
Copyright (C) 2010 by Lyo Kato |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
78
|
|
|
|
|
|
|
it under the same terms as Perl itself, either Perl version 5.8.8 or, |
79
|
|
|
|
|
|
|
at your option, any later version of Perl 5 you may have available. |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=cut |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
1; |
84
|
|
|
|
|
|
|
|