Skip to content

Commit

Permalink
Fix key patterns to add more compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
armando-rodriguez-cko committed Oct 11, 2023
1 parent a3e01a3 commit e13fafa
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

final class PreviousStaticKeysSdkCredentials extends AbstractStaticKeysSdkCredentials {

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*#$=]))$";
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*#$=]))$";
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*#$=]))$";
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*#$=]))$";

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

0 comments on commit e13fafa

Please sign in to comment.