Skip to content

Commit 472c35b

Browse files
Fix key patterns to add more compatibility
1 parent a3e01a3 commit 472c35b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/checkout/PreviousStaticKeysSdkCredentials.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
final class PreviousStaticKeysSdkCredentials extends AbstractStaticKeysSdkCredentials {
44

5-
private static final String PREVIOUS_SECRET_KEY_PATTERN = "^sk_(((test_)?(\\w{8})-(\\w{4})-(\\w{4})-(\\w{4})-(\\w{12}))|((sbox_)?[a-z2-7]{26}[a-z2-7*#$=]))$";
6-
private static final String PREVIOUS_PUBLIC_KEY_PATTEN = "^pk_(((test_)?(\\w{8})-(\\w{4})-(\\w{4})-(\\w{4})-(\\w{12}))|((sbox_)?[a-z2-7]{26}[a-z2-7*#$=]))$";
5+
private static final String PREVIOUS_SECRET_KEY_PATTERN = "^(Bearer )?sk_(((test_)?(\\w{8})-(\\w{4})-(\\w{4})-(\\w{4})-(\\w{12}))|((sbox_)?[a-z2-7]{26}[a-z2-7*#$=]))$";
6+
private static final String PREVIOUS_PUBLIC_KEY_PATTEN = "^(Bearer )?pk_(((test_)?(\\w{8})-(\\w{4})-(\\w{4})-(\\w{4})-(\\w{12}))|((sbox_)?[a-z2-7]{26}[a-z2-7*#$=]))$";
77

88
PreviousStaticKeysSdkCredentials(final String secretKey, final String publicKey) {
99
super(PlatformType.PREVIOUS, PREVIOUS_SECRET_KEY_PATTERN, PREVIOUS_PUBLIC_KEY_PATTEN, secretKey, publicKey);

0 commit comments

Comments
 (0)