line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package OAuth::Lite2::Model::AccessToken; |
2
|
|
|
|
|
|
|
|
3
|
10
|
|
|
10
|
|
7577
|
use strict; |
|
10
|
|
|
|
|
17
|
|
|
10
|
|
|
|
|
301
|
|
4
|
10
|
|
|
10
|
|
50
|
use warnings; |
|
10
|
|
|
|
|
14
|
|
|
10
|
|
|
|
|
353
|
|
5
|
|
|
|
|
|
|
|
6
|
10
|
|
|
10
|
|
49
|
use base 'Class::Accessor::Fast'; |
|
10
|
|
|
|
|
11
|
|
|
10
|
|
|
|
|
1230
|
|
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
|
10
|
|
|
10
|
|
2909
|
use Params::Validate; |
|
10
|
|
|
|
|
9303
|
|
|
10
|
|
|
|
|
1756
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub new { |
20
|
10
|
|
|
10
|
1
|
373
|
my $class = shift; |
21
|
10
|
100
|
|
|
|
37
|
my @args = @_ == 1 ? %{$_[0]} : @_; |
|
9
|
|
|
|
|
37
|
|
22
|
10
|
|
|
|
|
348
|
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
|
10
|
|
|
|
|
96
|
my $self = bless \%params, $class; |
35
|
10
|
|
|
|
|
39
|
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
|
|
|
|
|
|
|
|