File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -1031,10 +1031,6 @@ public function verifyJWTsignature($jwt) {
1031
1031
throw new OpenIDConnectClientException ('Error decoding JSON from token header ' );
1032
1032
}
1033
1033
$ payload = implode ('. ' , $ parts );
1034
- $ jwks = json_decode ($ this ->fetchURL ($ this ->getProviderConfigValue ('jwks_uri ' )));
1035
- if ($ jwks === NULL ) {
1036
- throw new OpenIDConnectClientException ('Error decoding JSON from jwks_uri ' );
1037
- }
1038
1034
if (!isset ($ header ->alg )) {
1039
1035
throw new OpenIDConnectClientException ('Error missing signature type in token header ' );
1040
1036
}
@@ -1045,6 +1041,11 @@ public function verifyJWTsignature($jwt) {
1045
1041
case 'RS512 ' :
1046
1042
$ hashtype = 'sha ' . substr ($ header ->alg , 2 );
1047
1043
$ signatureType = $ header ->alg === 'PS256 ' ? 'PSS ' : '' ;
1044
+
1045
+ $ jwks = json_decode ($ this ->fetchURL ($ this ->getProviderConfigValue ('jwks_uri ' )));
1046
+ if ($ jwks === NULL ) {
1047
+ throw new OpenIDConnectClientException ('Error decoding JSON from jwks_uri ' );
1048
+ }
1048
1049
1049
1050
$ verified = $ this ->verifyRSAJWTsignature ($ hashtype ,
1050
1051
$ this ->getKeyForHeader ($ jwks ->keys , $ header ),
You can’t perform that action at this time.
0 commit comments