File Coverage

blib/lib/Net/OAuth2Server/OIDC/GrantUtil.pm
Criterion Covered Total %
statement 6 10 60.0
branch 0 10 0.0
condition n/a
subroutine 2 4 50.0
pod 0 2 0.0
total 8 26 30.7


line stmt bran cond sub pod time code
1 1     1   430 use strict; use warnings;
  1     1   2  
  1         27  
  1         4  
  1         1  
  1         146  
2              
3             package Net::OAuth2Server::OIDC::GrantUtil;
4             our $VERSION = '0.006';
5              
6 0     0 0   sub provides_refresh_token { shift->scope->contains( 'offline_access' ) }
7              
8             sub userinfo_claims {
9 0     0 0   my $scope = shift->scope;
10 0 0         return unless $scope->contains( 'openid' );
11 0 0         ( qw( sub ), (
    0          
    0          
    0          
12             $scope->contains( 'profile' ) ? qw(
13             name family_name given_name middle_name nickname preferred_username
14             profile picture website
15             gender
16             birthdate
17             zoneinfo locale
18             updated_at
19             ) : (),
20             $scope->contains( 'email' ) ? qw( email email_verified ) : (),
21             $scope->contains( 'address' ) ? qw( address ) : (),
22             $scope->contains( 'phone' ) ? qw( phone_number phone_number_verified ) : (),
23             ) );
24             }
25              
26             1;