Skip to content

Commit

Permalink
chore: update validation example (#761)
Browse files Browse the repository at this point in the history
  • Loading branch information
kridai authored Aug 24, 2023
1 parent 7cde0bf commit 35b8a35
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/main/java/com/twilio/example/ValidationExample.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ public class ValidationExample {
* @throws TwiMLException if unable to generate TwiML
*/
public static void main(String[] args) throws Exception {
//Twilio.setRegion("dev");
// Generate public/private key pair
KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA");
keyGen.initialize(2048);
Expand All @@ -37,7 +36,6 @@ public static void main(String[] args) throws Exception {
// Use the default rest client
TwilioRestClient client =
new TwilioRestClient.Builder(ACCOUNT_SID, AUTH_TOKEN)
.region("dev")
.build();

// Create a public key and signing key using the default client
Expand All @@ -50,7 +48,6 @@ public static void main(String[] args) throws Exception {
// Switch to validation client as the default client
TwilioRestClient validationClient = new TwilioRestClient.Builder(signingKey.getSid(), signingKey.getSecret())
.accountSid(ACCOUNT_SID)
.region("dev")
// Validation client supports RS256 or PS256 algorithm. Default is RS256.
.httpClient(new ValidationClient(ACCOUNT_SID, key.getSid(), signingKey.getSid(), pair.getPrivate(), SignatureAlgorithm.PS256))
.build();
Expand Down

0 comments on commit 35b8a35

Please sign in to comment.