Skip to content

Commit 003ca44

Browse files
authored
fix: use verifyPayload instead of verify to disable duplicate signature check (#2080)
1 parent 8684064 commit 003ca44

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleIdTokenVerifier.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,11 @@ public final long getExpirationTimeMilliseconds() {
161161
* @return {@code true} if verified successfully or {@code false} if failed
162162
*/
163163
public boolean verify(GoogleIdToken googleIdToken) throws GeneralSecurityException, IOException {
164-
// check the payload
165-
if (!super.verify(googleIdToken)) {
164+
// check the payload only
165+
if (!super.verifyPayload(googleIdToken)) {
166166
return false;
167167
}
168+
168169
// verify signature, try all public keys in turn.
169170
for (PublicKey publicKey : publicKeys.getPublicKeys()) {
170171
if (googleIdToken.verifySignature(publicKey)) {

0 commit comments

Comments
 (0)