File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
src/main/java/com/google/firebase/fpnv/internal Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 2525import com .google .firebase .fpnv .FirebasePnvException ;
2626import com .google .firebase .fpnv .FirebasePnvToken ;
2727import com .nimbusds .jose .JOSEException ;
28+ import com .nimbusds .jose .JOSEObjectType ;
2829import com .nimbusds .jose .JWSAlgorithm ;
2930import com .nimbusds .jose .JWSHeader ;
3031import com .nimbusds .jose .jwk .source .JWKSource ;
@@ -129,7 +130,7 @@ private void verifyHeader(JWSHeader header) throws FirebasePnvException {
129130 );
130131 }
131132 // Check Type (typ)
132- if (Objects . isNull ( header . getType ()) || ! header .getType (). toString (). equals ( HEADER_TYP )) {
133+ if (! JOSEObjectType . JWT . equals ( header .getType ())) {
133134 throw new FirebasePnvException (
134135 FirebasePnvErrorCode .INVALID_ARGUMENT ,
135136 "FPNV has incorrect 'typ'. Expected " + HEADER_TYP
You can’t perform that action at this time.
0 commit comments