-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add redirect_url to Silent Auth workflow (#496)
* feat: Add redirect_url to SA * Bump version: v8.0.0-rc2 → v8.0.0 * chore: Parameterize dependency versions
- Loading branch information
Showing
7 changed files
with
56 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,8 @@ public class VerificationRequestTest { | |
TO_EMAIL = "[email protected]", | ||
FROM_EMAIL = "[email protected]", | ||
CLIENT_REF = "my-personal-reference", | ||
APP_HASH = "kkeid8sksd3"; | ||
APP_HASH = "kkeid8sksd3", | ||
REDIRECT_URL = "https://acme-app.com/sa/redirect"; | ||
|
||
Builder newBuilder() { | ||
return VerificationRequest.builder().brand(BRAND); | ||
|
@@ -66,7 +67,7 @@ Workflow getWorkflowRequiredParamsForChannel(Channel channel) { | |
Workflow getWorkflowAllParamsForChannel(Channel channel) { | ||
switch (channel) { | ||
case SILENT_AUTH: | ||
return new SilentAuthWorkflow(TO_NUMBER, SANDBOX); | ||
return new SilentAuthWorkflow(TO_NUMBER, SANDBOX, REDIRECT_URL); | ||
case SMS: | ||
return new SmsWorkflow(TO_NUMBER, APP_HASH); | ||
case WHATSAPP: | ||
|
@@ -117,7 +118,7 @@ String getExpectedAllParamsForSingleWorkflowJson(Channel channel) { | |
} | ||
if (channel == Channel.SILENT_AUTH) { | ||
prefix = TO_NUMBER + '"'; | ||
replacement = prefix + ",\"sandbox\":" + SANDBOX; | ||
replacement = prefix + ",\"sandbox\":" + SANDBOX + ",\"redirect_url\":\"" + REDIRECT_URL + '"'; | ||
expectedJson = expectedJson.replace(prefix, replacement); | ||
} | ||
|
||
|