| 1 | package Google::Auth::IDTokens::Verifier; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | 3 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 3 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||
| 6 | 3 | ▶ | use Moo; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 7 | 3 | ▶ | use JSON::MaybeXS; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 8 | 3 | ▶ | use MIME::Base64 qw(decode_base64); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 9 | 3 | ▶ | use Google::Auth; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 10 | 3 | ▶ | use Google::Auth::IDTokens::KeySources; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||
| 12 | 3 | has key_source => ( | |||||||||||||||||||||||||||
| 13 | is => 'ro', | ||||||||||||||||||||||||||||
| 14 | required => 0, | ||||||||||||||||||||||||||||
| 15 | ); | ||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||
| 17 | 3 | has aud => ( | |||||||||||||||||||||||||||
| 18 | is => 'ro', | ||||||||||||||||||||||||||||
| 19 | required => 0, | ||||||||||||||||||||||||||||
| 20 | ); | ||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||
| 22 | 3 | has azp => ( | |||||||||||||||||||||||||||
| 23 | is => 'ro', | ||||||||||||||||||||||||||||
| 24 | required => 0, | ||||||||||||||||||||||||||||
| 25 | ); | ||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||
| 27 | 3 | has iss => ( | |||||||||||||||||||||||||||
| 28 | is => 'ro', | ||||||||||||||||||||||||||||
| 29 | required => 0, | ||||||||||||||||||||||||||||
| 30 | ); | ||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||
| 32 | 33 | ▶ | sub _decode_base64url { | ||||||||||||||||||||||||||
|
Subroutine
_decode_base64url: called CC=2 SCAR=6.9
| |||||||||||||||||||||||||||||
| 33 | 33 | my ($s) = @_; | |||||||||||||||||||||||||||
| 34 | 33 | $s =~ tr{-_}{+/}; | |||||||||||||||||||||||||||
| 35 | 33 | my $padding = length($s) % 4; | |||||||||||||||||||||||||||
| 36 | 33 | ▶ | if ($padding) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 37 | 27 | $s .= '=' x (4 - $padding); | |||||||||||||||||||||||||||
| 38 | } | ||||||||||||||||||||||||||||
| 39 | 33 | return MIME::Base64::decode_base64($s); | |||||||||||||||||||||||||||
| 40 | } | ||||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||
| 42 | 11 | ▶ | sub verify { | ||||||||||||||||||||||||||
|
Subroutine
verify: called CC=41 SCAR=40.1
Pod
undocumented
| |||||||||||||||||||||||||||||
| 43 | 11 | my ($self, $token, %options) = @_; | |||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||
| 45 | 11 | ▶ | $self = ref $self ? $self : $self->new(); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 46 | |||||||||||||||||||||||||||||
| 47 | 11 | ▶ | my $key_source = $options{key_source} // $self->key_source; | ||||||||||||||||||||||||||
|
Condition33%1/3
$options{"key_source"} // $self->key_source
MC/DC0%0/2
$options{"key_source"} // $self->key_source
$options{"key_source"}
$self->key_source
Truth table33%1/3
A // B
A= $options{"key_source"}B= $self->key_source
| |||||||||||||||||||||||||||||
| 48 | 11 | ▶ | my $aud = $options{aud} // $self->aud; | ||||||||||||||||||||||||||
|
Condition66%2/3
$options{"aud"} // $self->aud
MC/DC0%0/2
$options{"aud"} // $self->aud
$options{"aud"}
$self->aud
Truth table66%2/3
A // B
A= $options{"aud"}B= $self->aud
| |||||||||||||||||||||||||||||
| 49 | 11 | ▶ | my $azp = $options{azp} // $self->azp; | ||||||||||||||||||||||||||
|
Condition100%3/3
$options{"azp"} // $self->azp
MC/DC100%2/2
$options{"azp"} // $self->azp
$options{"azp"}
$self->azp
Truth table100%3/3
A // B
A= $options{"azp"}B= $self->azp
| |||||||||||||||||||||||||||||
| 50 | 11 | ▶ | my $iss = $options{iss} // $self->iss; | ||||||||||||||||||||||||||
|
Condition66%2/3
$options{"iss"} // $self->iss
MC/DC0%0/2
$options{"iss"} // $self->iss
$options{"iss"}
$self->iss
Truth table66%2/3
A // B
A= $options{"iss"}B= $self->iss
| |||||||||||||||||||||||||||||
| 51 | 11 | ▶ | my $clock_skew = $options{clock_skew} // 300; | ||||||||||||||||||||||||||
|
Condition50%1/2
$options{"clock_skew"} // 300
MC/DC0%0/1
$options{"clock_skew"} // 300
$options{"clock_skew"}
Truth table50%1/2
A
A= $options{"clock_skew"}
| |||||||||||||||||||||||||||||
| 52 | |||||||||||||||||||||||||||||
| 53 | 11 | ▶ | die 'KeySourceError: No key source provided' unless defined $key_source; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 54 | |||||||||||||||||||||||||||||
| 55 | 11 | my @parts = split /\./, $token; | |||||||||||||||||||||||||||
| 56 | 11 | ▶ | if (@parts != 3) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 57 | 0 | die 'VerificationError: Invalid JWT format'; | |||||||||||||||||||||||||||
| 58 | } | ||||||||||||||||||||||||||||
| 59 | 11 | my ($header_b64, $payload_b64, $signature_b64) = @parts; | |||||||||||||||||||||||||||
| 60 | |||||||||||||||||||||||||||||
| 61 | 11 | my $coder = JSON::MaybeXS->new->utf8->allow_nonref; | |||||||||||||||||||||||||||
| 62 | 11 | my $header = eval { $coder->decode(_decode_base64url($header_b64)) }; | |||||||||||||||||||||||||||
| 63 | 11 | ▶ | if ($@) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 64 | 0 | die 'VerificationError: Failed to parse JWT header: ' . $@; | |||||||||||||||||||||||||||
| 65 | } | ||||||||||||||||||||||||||||
| 66 | 11 | my $payload = eval { $coder->decode(_decode_base64url($payload_b64)) }; | |||||||||||||||||||||||||||
| 67 | 11 | ▶ | if ($@) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 68 | 0 | die 'VerificationError: Failed to parse JWT payload: ' . $@; | |||||||||||||||||||||||||||
| 69 | } | ||||||||||||||||||||||||||||
| 70 | |||||||||||||||||||||||||||||
| 71 | 11 | my $kid = $header->{kid}; | |||||||||||||||||||||||||||
| 72 | 11 | ▶ | die 'VerificationError: Missing kid claim in JWT header' unless defined $kid; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 73 | |||||||||||||||||||||||||||||
| 74 | 11 | my $signature = _decode_base64url($signature_b64); | |||||||||||||||||||||||||||
| 75 | 11 | my $message = $header_b64 . '.' . $payload_b64; | |||||||||||||||||||||||||||
| 76 | |||||||||||||||||||||||||||||
| 77 | 11 | my $payload_verified; | |||||||||||||||||||||||||||
| 78 | |||||||||||||||||||||||||||||
| 79 | 16 | ▶ | my $verify_with_keys = sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=4 SCAR=13.9
| |||||||||||||||||||||||||||||
| 80 | 16 | my ($keys_ref) = @_; | |||||||||||||||||||||||||||
| 81 | 16 | foreach my $key (@$keys_ref) { | |||||||||||||||||||||||||||
| 82 | 31 | ▶ | if ($key->id eq $kid) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 83 | 13 | ▶ | if (Google::Auth::verify_signature($key->key, $message, $signature)) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 84 | 9 | return 1; | |||||||||||||||||||||||||||
| 85 | } | ||||||||||||||||||||||||||||
| 86 | } | ||||||||||||||||||||||||||||
| 87 | } | ||||||||||||||||||||||||||||
| 88 | 7 | return 0; | |||||||||||||||||||||||||||
| 89 | 11 | }; | |||||||||||||||||||||||||||
| 90 | |||||||||||||||||||||||||||||
| 91 | 11 | my $keys_ref = $key_source->current_keys; | |||||||||||||||||||||||||||
| 92 | 11 | ▶ | if ($verify_with_keys->($keys_ref)) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 93 | 6 | $payload_verified = 1; | |||||||||||||||||||||||||||
| 94 | } else { | ||||||||||||||||||||||||||||
| 95 | 5 | my $refreshed_keys_ref = $key_source->refresh_keys; | |||||||||||||||||||||||||||
| 96 | 5 | ▶ | if ($verify_with_keys->($refreshed_keys_ref)) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 97 | 3 | $payload_verified = 1; | |||||||||||||||||||||||||||
| 98 | } | ||||||||||||||||||||||||||||
| 99 | } | ||||||||||||||||||||||||||||
| 100 | |||||||||||||||||||||||||||||
| 101 | 11 | ▶ | unless ($payload_verified) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 102 | 2 | die 'SignatureError: Token signature verification failed'; | |||||||||||||||||||||||||||
| 103 | } | ||||||||||||||||||||||||||||
| 104 | |||||||||||||||||||||||||||||
| 105 | 9 | ▶ | my $now = $options{time_now} // time(); | ||||||||||||||||||||||||||
|
Condition50%1/2
$options{"time_now"} // time
MC/DC0%0/1
$options{"time_now"} // time
$options{"time_now"}
Truth table50%1/2
A
A= $options{"time_now"}
| |||||||||||||||||||||||||||||
| 106 | 9 | ▶ | if (exists $payload->{exp} && $payload->{exp} < $now - $clock_skew) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
exists $payload->{"exp"} and $payload->{"exp"} < $now - $clock_skew
MC/DC50%1/2
exists $payload->{"exp"} and $payload->{"exp"} < $now - $clock_skew
exists $payload->{"exp"}
$payload->{"exp"} < $now - $clock_skew
Truth table66%2/3
A and B
A= exists $payload->{"exp"}B= $payload->{"exp"} < $now - $clock_skew
| |||||||||||||||||||||||||||||
| 107 | 2 | die 'ExpiredTokenError: Token signature is expired'; | |||||||||||||||||||||||||||
| 108 | } | ||||||||||||||||||||||||||||
| 109 | 7 | ▶ | if (exists $payload->{nbf} && $payload->{nbf} > $now + $clock_skew) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
exists $payload->{"nbf"} and $payload->{"nbf"} > $now + $clock_skew
MC/DC0%0/2
exists $payload->{"nbf"} and $payload->{"nbf"} > $now + $clock_skew
exists $payload->{"nbf"}
$payload->{"nbf"} > $now + $clock_skew
Truth table33%1/3
A and B
A= exists $payload->{"nbf"}B= $payload->{"nbf"} > $now + $clock_skew
| |||||||||||||||||||||||||||||
| 110 | 0 | die 'VerificationError: Token not yet valid'; | |||||||||||||||||||||||||||
| 111 | } | ||||||||||||||||||||||||||||
| 112 | 7 | ▶ | if (exists $payload->{iat} && $payload->{iat} > $now + $clock_skew) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
exists $payload->{"iat"} and $payload->{"iat"} > $now + $clock_skew
MC/DC0%0/2
exists $payload->{"iat"} and $payload->{"iat"} > $now + $clock_skew
exists $payload->{"iat"}
$payload->{"iat"} > $now + $clock_skew
Truth table33%1/3
A and B
A= exists $payload->{"iat"}B= $payload->{"iat"} > $now + $clock_skew
| |||||||||||||||||||||||||||||
| 113 | 0 | die 'VerificationError: Token issued in the future'; | |||||||||||||||||||||||||||
| 114 | } | ||||||||||||||||||||||||||||
| 115 | |||||||||||||||||||||||||||||
| 116 | 7 | ▶ | $payload->{azp} ||= $payload->{cid} if exists $payload->{cid}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$payload->{"azp"} ||= $payload->{"cid"}
MC/DC0%0/2
$payload->{"azp"} ||= $payload->{"cid"}
$payload->{"azp"}
$payload->{"cid"}
Truth table0%0/3
A ||= B
A= $payload->{"azp"}B= $payload->{"cid"}
| |||||||||||||||||||||||||||||
| 117 | |||||||||||||||||||||||||||||
| 118 | 7 | ▶ | if (defined $aud) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 119 | 7 | ▶ | my @expected_auds = ref $aud eq 'ARRAY' ? @$aud : ($aud); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 120 | 7 | my $token_aud = $payload->{aud}; | |||||||||||||||||||||||||||
| 121 | 7 | ▶ | my @token_auds = ref $token_aud eq 'ARRAY' ? @$token_aud : ($token_aud); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 122 | |||||||||||||||||||||||||||||
| 123 | 7 | my %expected_map = map { $_ => 1 } @expected_auds; | |||||||||||||||||||||||||||
| 124 | 7 | my $aud_match = 0; | |||||||||||||||||||||||||||
| 125 | 7 | foreach my $t_aud (@token_auds) { | |||||||||||||||||||||||||||
| 126 | 7 | ▶ | if (exists $expected_map{$t_aud}) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 127 | 6 | $aud_match = 1; | |||||||||||||||||||||||||||
| 128 | 6 | last; | |||||||||||||||||||||||||||
| 129 | } | ||||||||||||||||||||||||||||
| 130 | } | ||||||||||||||||||||||||||||
| 131 | 7 | ▶ | unless ($aud_match) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 132 | 1 | die 'AudienceMismatchError: Token aud mismatch: ' . | |||||||||||||||||||||||||||
| 133 | join(', ', @token_auds); | ||||||||||||||||||||||||||||
| 134 | } | ||||||||||||||||||||||||||||
| 135 | } | ||||||||||||||||||||||||||||
| 136 | |||||||||||||||||||||||||||||
| 137 | 6 | ▶ | if (defined $azp) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 138 | 5 | ▶ | my @expected_azps = ref $azp eq 'ARRAY' ? @$azp : ($azp); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 139 | 5 | my $token_azp = $payload->{azp}; | |||||||||||||||||||||||||||
| 140 | 5 | ▶ | my @token_azps = ref $token_azp eq 'ARRAY' ? @$token_azp : ($token_azp); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 141 | |||||||||||||||||||||||||||||
| 142 | 5 | my %expected_map = map { $_ => 1 } @expected_azps; | |||||||||||||||||||||||||||
| 143 | 5 | my $azp_match = 0; | |||||||||||||||||||||||||||
| 144 | 5 | foreach my $t_azp (@token_azps) { | |||||||||||||||||||||||||||
| 145 | 5 | ▶ | if (exists $expected_map{$t_azp}) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 146 | 4 | $azp_match = 1; | |||||||||||||||||||||||||||
| 147 | 4 | last; | |||||||||||||||||||||||||||
| 148 | } | ||||||||||||||||||||||||||||
| 149 | } | ||||||||||||||||||||||||||||
| 150 | 5 | ▶ | unless ($azp_match) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 151 | 1 | ▶ | die 'AuthorizedPartyMismatchError: Token azp mismatch: ' . | ||||||||||||||||||||||||||
|
Condition50%1/2
$token_azp // ""
MC/DC0%0/1
$token_azp // ""
$token_azp
Truth table50%1/2
A
A= $token_azp
| |||||||||||||||||||||||||||||
| 152 | ($token_azp // ''); | ||||||||||||||||||||||||||||
| 153 | } | ||||||||||||||||||||||||||||
| 154 | } | ||||||||||||||||||||||||||||
| 155 | |||||||||||||||||||||||||||||
| 156 | 5 | ▶ | if (defined $iss) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 157 | 5 | ▶ | my @expected_isss = ref $iss eq 'ARRAY' ? @$iss : ($iss); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 158 | 5 | my $token_iss = $payload->{iss}; | |||||||||||||||||||||||||||
| 159 | |||||||||||||||||||||||||||||
| 160 | 5 | my %expected_map = map { $_ => 1 } @expected_isss; | |||||||||||||||||||||||||||
| 161 | 5 | ▶ | unless (exists $expected_map{$token_iss}) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 162 | 1 | ▶ | die 'IssuerMismatchError: Token iss mismatch: ' . ($token_iss // ''); | ||||||||||||||||||||||||||
|
Condition50%1/2
$token_iss // ""
MC/DC0%0/1
$token_iss // ""
$token_iss
Truth table50%1/2
A
A= $token_iss
| |||||||||||||||||||||||||||||
| 163 | } | ||||||||||||||||||||||||||||
| 164 | } | ||||||||||||||||||||||||||||
| 165 | |||||||||||||||||||||||||||||
| 166 | 4 | return $payload; | |||||||||||||||||||||||||||
| 167 | } | ||||||||||||||||||||||||||||
| 168 | |||||||||||||||||||||||||||||
| 169 | 3 | my $_oidc_verifier; | |||||||||||||||||||||||||||
| 170 | |||||||||||||||||||||||||||||
| 171 | 3 | ▶ | sub verify_oidc { | ||||||||||||||||||||||||||
|
Subroutine
verify_oidc: called CC=2 SCAR=7.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 172 | 3 | my ($class, $token, %options) = @_; | |||||||||||||||||||||||||||
| 173 | |||||||||||||||||||||||||||||
| 174 | 3 | ▶ | $_oidc_verifier //= Google::Auth::IDTokens::Verifier->new( | ||||||||||||||||||||||||||
|
Condition66%2/3
$_oidc_verifier //= "Google::Auth::IDTokens::Verifier"->new("key_source", "Google::Auth::IDTokens::JwkHttpKeySource"->new({"uri", "https://www.googleapis.com/oauth2/v3/certs"}), "iss", ["accounts.google.com", "https://accounts.google.com"])
MC/DC0%0/2
$_oidc_verifier //= "Google::Auth::IDTokens::Verifier"->new("key_source", "Google::Auth::IDTokens::JwkHttpKeySource"->new({"uri", "https://www.googleapis.com/oauth2/v3/certs"}), "iss", ["accounts.google.com", "https://accounts.google.com"])
$_oidc_verifier
"Google::Auth::IDTokens::Verifier"->new("key_source", "Google::Auth::IDTokens::JwkHttpKeySource"->new({"uri", "https://www.googleapis.com/oauth2/v3/certs"}), "iss", ["accounts.google.com", "https://accounts.google.com"])
Truth table66%2/3
A //= B
A= $_oidc_verifierB= "Google::Auth::IDTokens::Verifier"->new("key_source", "Google::Auth::IDTokens::JwkHttpKeySource"->new({"uri", "https://www.googleapis.com/oauth2/v3/certs"}), "iss", ["accounts.google.com", "https://accounts.google.com"])
| |||||||||||||||||||||||||||||
| 175 | key_source => Google::Auth::IDTokens::JwkHttpKeySource->new({ | ||||||||||||||||||||||||||||
| 176 | uri => 'https://www.googleapis.com/oauth2/v3/certs' | ||||||||||||||||||||||||||||
| 177 | } | ||||||||||||||||||||||||||||
| 178 | ), | ||||||||||||||||||||||||||||
| 179 | iss => ['accounts.google.com', 'https://accounts.google.com']); | ||||||||||||||||||||||||||||
| 180 | |||||||||||||||||||||||||||||
| 181 | 3 | return $_oidc_verifier->verify($token, %options); | |||||||||||||||||||||||||||
| 182 | } | ||||||||||||||||||||||||||||
| 183 | |||||||||||||||||||||||||||||
| 184 | my $_iap_verifier; | ||||||||||||||||||||||||||||
| 185 | |||||||||||||||||||||||||||||
| 186 | 3 | ▶ | sub verify_iap { | ||||||||||||||||||||||||||
|
Subroutine
verify_iap: called CC=2 SCAR=7.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 187 | 3 | my ($class, $token, %options) = @_; | |||||||||||||||||||||||||||
| 188 | |||||||||||||||||||||||||||||
| 189 | 3 | ▶ | $_iap_verifier //= Google::Auth::IDTokens::Verifier->new( | ||||||||||||||||||||||||||
|
Condition66%2/3
$_iap_verifier //= "Google::Auth::IDTokens::Verifier"->new("key_source", "Google::Auth::IDTokens::JwkHttpKeySource"->new({"uri", "https://www.googleapis.com/iap/verify/public_key-jwk"}), "iss", "https://cloud.google.com/iap")
MC/DC0%0/2
$_iap_verifier //= "Google::Auth::IDTokens::Verifier"->new("key_source", "Google::Auth::IDTokens::JwkHttpKeySource"->new({"uri", "https://www.googleapis.com/iap/verify/public_key-jwk"}), "iss", "https://cloud.google.com/iap")
$_iap_verifier
"Google::Auth::IDTokens::Verifier"->new("key_source", "Google::Auth::IDTokens::JwkHttpKeySource"->new({"uri", "https://www.googleapis.com/iap/verify/public_key-jwk"}), "iss", "https://cloud.google.com/iap")
Truth table66%2/3
A //= B
A= $_iap_verifierB= "Google::Auth::IDTokens::Verifier"->new("key_source", "Google::Auth::IDTokens::JwkHttpKeySource"->new({"uri", "https://www.googleapis.com/iap/verify/public_key-jwk"}), "iss", "https://cloud.google.com/iap")
| |||||||||||||||||||||||||||||
| 190 | key_source => Google::Auth::IDTokens::JwkHttpKeySource->new({ | ||||||||||||||||||||||||||||
| 191 | uri => 'https://www.googleapis.com/iap/verify/public_key-jwk' | ||||||||||||||||||||||||||||
| 192 | } | ||||||||||||||||||||||||||||
| 193 | ), | ||||||||||||||||||||||||||||
| 194 | iss => 'https://cloud.google.com/iap' | ||||||||||||||||||||||||||||
| 195 | ); | ||||||||||||||||||||||||||||
| 196 | |||||||||||||||||||||||||||||
| 197 | 3 | return $_iap_verifier->verify($token, %options); | |||||||||||||||||||||||||||
| 198 | } | ||||||||||||||||||||||||||||
| 199 | |||||||||||||||||||||||||||||
| 200 | 3 | 1; | |||||||||||||||||||||||||||