Skip to content

Commit

Permalink
Merge pull request #68 from alexanderjordanbaker/AppAppleIdProdException
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderjordanbaker authored Mar 6, 2024
2 parents 526a998 + 6be21bf commit 7a02183
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@ public class ExampleVerification {
new FileInputStream("/path/to/rootCA1"),
new FileInputStream("/path/to/rootCA2")
);
Long appAppleId = null; // appAppleId must be provided for the Production environment

SignedDataVerifier signedPayloadVerifier = new SignedDataVerifier(rootCAs, bundleId, null, environment, true);
SignedDataVerifier signedPayloadVerifier = new SignedDataVerifier(rootCAs, bundleId, appAppleId, environment, true);

String notificationPayload = "ey...";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ public SignedDataVerifier(Set<InputStream> rootCertificates, String bundleId, Lo
.withIsGetterVisibility(JsonAutoDetect.Visibility.NONE)
.withSetterVisibility(JsonAutoDetect.Visibility.NONE)
.withCreatorVisibility(JsonAutoDetect.Visibility.NONE));
if (appAppleId == null && Environment.PRODUCTION.equals(environment)) {
throw new IllegalArgumentException("appAppleId is required when the environment is Production");
}
}

/**
Expand Down

0 comments on commit 7a02183

Please sign in to comment.