OAuth/Lite2/Model/AuthInfo.pm

filter: Statementstmt 100% 20 / 20 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 100% 28 / 28 CC 2 SCAR 2.9
CC
2
Cov
100%
new
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« OAuth/Lite2/Model/AccessToken.pm ↑ Summary OAuth/Lite2/Model/ServerState.pm »
1 package OAuth::Lite2::Model::AuthInfo;
2  
3 17 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 17 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 17 ▶use base 'Class::Accessor::Fast';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 17 __PACKAGE__->mk_accessors(qw(
9 id
10 user_id
11 client_id
12 scope
13 refresh_token
14 code
15 redirect_uri
16 server_state
17 ));
18  
19 17 ▶use Params::Validate;
Subroutine BEGIN: called CC=1 SCAR=0.0
20  
21 37 ▶sub new {
Subroutine new: called CC=2 SCAR=6.9
Pod documented
22 37 my $class = shift;
23 37 ▶ my @args = @_ == 1 ? %{$_[0]} : @_;
Branch: 1 branch
BranchTrueFalseTotal
@_ == 1 ? : 36 1 37
24 37 my %params = Params::Validate::validate_with(
25 params => \@args,
26 spec => {
27 id => 1,
28 user_id => 1,
29 client_id => 1,
30 scope => { optional => 1 },
31 refresh_token => { optional => 1 },
32 code => { optional => 1 },
33 redirect_uri => { optional => 1 },
34 server_state => { optional => 1 },
35 },
36 allow_extra => 1,
37 );
38 37 my $self = bless \%params, $class;
39 37 return $self;
40 }
41  
42 =head1 NAME
43  
44 OAuth::Lite2::Model::AuthInfo - model class that represents authorization info.
45  
46 =head1 ACCESSORS
47  
48 =head2 id
49  
50 Identifier of this authorization info.
51  
52 =head2 user_id
53  
54 User identifier for resource owner
55  
56 =head2 client_id
57  
58 CLient identifier for obtain token
59  
60 =head2 scope
61  
62 Scope string for authorization info
63  
64 =head2 refresh_token
65  
66 Refresh token related with authorization info
67  
68 =head2 code
69  
70 Authorization code related with authorization info
71  
72 =head2 redirect_uri
73  
74 Redirect URI related with authorization info
75  
76 =head2 server_state
77  
78 Server State for CSRF Protection
79  
80 =head1 AUTHOR
81  
82 Ryo Ito, E<lt>ritou.06@gmail.comE<gt>
83  
84 Lyo Kato, E<lt>lyo.kato@gmail.comE<gt>
85  
86 =head1 COPYRIGHT AND LICENSE
87  
88 Copyright (C) 2010 by Lyo Kato
89  
90 This library is free software; you can redistribute it and/or modify
91 it under the same terms as Perl itself, either Perl version 5.8.8 or,
92 at your option, any later version of Perl 5 you may have available.
93  
94 =cut
95  
96 17 1;
« OAuth/Lite2/Model/AccessToken.pm ↑ Summary OAuth/Lite2/Model/ServerState.pm »