Skip to content

Commit ddd26ef

Browse files
committed
make jwt signature verification mandatory
1 parent 019c76a commit ddd26ef

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/Utilities/CaptureContext/CaptureContextParser.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,21 @@ class CaptureContextParser
3434
/**
3535
* Parses a capture context JWT response and optionally verifies its signature
3636
*
37-
* This function parses a JWT token from a capture context response and can optionally
37+
* This function parses a JWT token from a capture context response and will mandatorily
3838
* verify the JWT signature using a public key fetched from the Flex API. It implements
3939
* caching to avoid repeated API calls for the same public key.
4040
*
4141
* @param string $jwtValue The JWT token to parse
4242
* @param MerchantConfiguration $merchantConfig The merchant configuration object
43-
* @param bool $verifyJwt Whether to verify the JWT signature (default: true)
4443
*
4544
* @return array The parsed JWT payload
4645
* @throws InvalidJwtException If the JWT is invalid or cannot be parsed
4746
* @throws JwtSignatureValidationException If JWT signature verification fails
4847
* @throws Exception If merchant config or run environment is missing
4948
*/
50-
public static function parseCaptureContextResponse($jwtValue, $merchantConfig, $verifyJwt = true)
49+
public static function parseCaptureContextResponse($jwtValue, $merchantConfig)
5150
{
51+
$verifyJwt = true;
5252
// Validate JWT value
5353
if (empty($jwtValue)) {
5454
throw new InvalidJwtException('JWT value is null or undefined');

0 commit comments

Comments
 (0)