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   537 use strict; use warnings;
  1     1   3  
  1         29  
  1         5  
  1         2  
  1         156  
2              
3             package Net::OAuth2Server::OIDC::GrantUtil;
4              
5 0     0 0   sub provides_refresh_token { shift->scope->contains( 'offline_access' ) }
6              
7             sub userinfo_claims {
8 0     0 0   my $scope = shift->scope;
9 0 0         return unless $scope->contains( 'openid' );
10 0 0         ( qw( sub ), (
    0          
    0          
    0          
11             $scope->contains( 'profile' ) ? qw(
12             name family_name given_name middle_name nickname preferred_username
13             profile picture website
14             gender
15             birthdate
16             zoneinfo locale
17             updated_at
18             ) : (),
19             $scope->contains( 'email' ) ? qw( email email_verified ) : (),
20             $scope->contains( 'address' ) ? qw( address ) : (),
21             $scope->contains( 'phone' ) ? qw( phone_number phone_number_verified ) : (),
22             ) );
23             }
24              
25             our $VERSION = '0.005';