-
Notifications
You must be signed in to change notification settings - Fork 7
feat(sca): add Strong Customer Authentication surface #558
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
jklein24
wants to merge
4
commits into
main
Choose a base branch
from
feat/striga-sca
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
5c3a7db
feat(sca): add Strong Customer Authentication surface
jklein24 fa9d274
docs(sca): clarify ScaChallenge.id is informational, not supplied back
jklein24 1a2b85d
docs(sca): clarify inline scaAuthorization is for the initial execute…
jklein24 5d6ff50
docs(sca): document PENDING_AUTHORIZATION outcome on transfer-out 201
jklein24 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
openapi/components/schemas/quotes/ExecuteQuoteRequest.yaml
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| type: object | ||
| description: >- | ||
| Optional body for executing a quote. Only needed to supply an inline Strong | ||
| Customer Authentication proof; omit the body entirely for quotes that do not | ||
| require SCA. | ||
| properties: | ||
| scaAuthorization: | ||
| $ref: ../sca/ScaAuthorization.yaml | ||
| description: >- | ||
| Optional inline Strong Customer Authentication proof. Only relevant for | ||
| customers whose provider requires SCA (e.g. EU): supply this to satisfy | ||
| the challenge in the same call once the customer has the code/assertion. | ||
| Omit it to receive the quote in `PENDING_AUTHORIZATION` with an | ||
| `scaChallenge`, then authorize separately. Ignored for customers whose | ||
| provider does not require SCA. |
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| type: object | ||
| description: >- | ||
| Proof that satisfies an `ScaChallenge`. Provide exactly one of `code` (for | ||
| `SMS_OTP` / `TOTP`) or `passkeyAssertion` (for `PASSKEY`). | ||
| properties: | ||
| code: | ||
| type: | ||
| - string | ||
| - 'null' | ||
| description: >- | ||
| The one-time code the customer received by SMS, or read from their | ||
| authenticator app. In sandbox, the code is always `123456`. | ||
| example: '123456' | ||
| passkeyAssertion: | ||
| type: | ||
| - object | ||
| - 'null' | ||
| additionalProperties: true | ||
| description: >- | ||
| Opaque WebAuthn assertion produced by the device from the challenge's | ||
| `passkeyAssertionOptions`. Required when satisfying a `PASSKEY` challenge. |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| type: object | ||
| description: >- | ||
| A Strong Customer Authentication challenge that must be satisfied before a | ||
| money-movement operation can complete. This object is **only present when the | ||
| customer's payment provider requires SCA** (e.g. EU customers on an e-money | ||
| provider); for customers whose provider has no such requirement it is omitted | ||
| entirely and no action is needed. | ||
|
|
||
|
|
||
| When present on a quote or transaction, authorize it by submitting an | ||
| `ScaAuthorization` proof to `POST /quotes/{quoteId}/authorize` or | ||
| `POST /transactions/{transactionId}/authorize`, or inline via the optional | ||
| `scaAuthorization` field on the originating `execute` / `transfer-out` call. | ||
| required: | ||
| - id | ||
| - expiresAt | ||
| - factor | ||
| - availableFactors | ||
| properties: | ||
| id: | ||
| type: string | ||
| description: >- | ||
| Unique identifier for this challenge. The server resolves the active | ||
| challenge from the quote or transaction being authorized, so this field | ||
| need not be supplied back; it is informational (e.g. for logging or | ||
| correlation). | ||
| example: ScaChallenge:019542f5-b3e7-1d02-0000-000000000007 | ||
| expiresAt: | ||
| type: string | ||
| format: date-time | ||
| description: Absolute UTC timestamp after which this challenge can no longer be authorized. | ||
| example: '2025-10-03T12:05:00Z' | ||
| factor: | ||
| $ref: ./ScaFactor.yaml | ||
| description: The factor this challenge was issued for. Defaults to `SMS_OTP`. | ||
| availableFactors: | ||
| type: array | ||
| description: The factors the customer may use to satisfy this challenge. | ||
| items: | ||
| $ref: ./ScaFactor.yaml | ||
| example: | ||
| - SMS_OTP | ||
| passkeyAssertionOptions: | ||
| type: | ||
| - object | ||
| - 'null' | ||
| additionalProperties: true | ||
| description: >- | ||
| Opaque WebAuthn assertion request options, present only when `factor` is | ||
| `PASSKEY`. Pass to the device's WebAuthn API to produce the assertion | ||
| submitted back in `ScaAuthorization.passkeyAssertion`. | ||
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| type: string | ||
| enum: | ||
| - SMS_OTP | ||
| - TOTP | ||
| - PASSKEY | ||
| description: | | ||
| A Strong Customer Authentication factor. | ||
|
|
||
| | Factor | Description | | ||
| |--------|-------------| | ||
| | `SMS_OTP` | One-time code sent by SMS to the customer's verified phone. Requires no prior enrollment. | | ||
| | `TOTP` | Time-based one-time code from an authenticator app. Requires enrollment. Not valid for per-transaction challenges (cannot carry dynamic linking). | | ||
| | `PASSKEY` | WebAuthn passkey assertion. Requires enrollment. | |
This file contains hidden or 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 hidden or 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 hidden or 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| parameters: | ||
| - name: quoteId | ||
| in: path | ||
| description: The unique identifier of the quote whose SCA challenge is being authorized. | ||
| required: true | ||
| schema: | ||
| type: string | ||
| example: Quote:019542f5-b3e7-1d02-0000-000000000006 | ||
| post: | ||
| summary: Authorize a quote's SCA challenge | ||
| description: | | ||
| Satisfy the Strong Customer Authentication challenge carried by a quote in | ||
| `PENDING_AUTHORIZATION` status by submitting an `ScaAuthorization` proof. | ||
|
|
||
| This is used for realtime-funding quotes: the quote is returned with an | ||
| `scaChallenge` and **without** `paymentInstructions`; once authorized, the | ||
| quote advances and its `paymentInstructions` are populated so the customer | ||
| can fund the transfer. | ||
|
|
||
| This endpoint is only meaningful for customers whose payment provider | ||
| requires SCA (e.g. EU customers). For customers whose provider has no such | ||
| requirement, this returns `409`. | ||
|
|
||
| In sandbox, the SMS/TOTP code is always `123456`. | ||
| operationId: authorizeQuote | ||
| tags: | ||
| - Strong Customer Authentication | ||
| security: | ||
| - BasicAuth: [] | ||
| requestBody: | ||
| required: true | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: ../../components/schemas/sca/ScaAuthorization.yaml | ||
| responses: | ||
| '200': | ||
| description: Challenge authorized; the updated quote is returned. | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: ../../components/schemas/quotes/Quote.yaml | ||
| '400': | ||
| description: Invalid or expired authorization proof | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: ../../components/schemas/errors/Error400.yaml | ||
| '401': | ||
| description: Unauthorized | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: ../../components/schemas/errors/Error401.yaml | ||
| '404': | ||
| description: Quote not found | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: ../../components/schemas/errors/Error404.yaml | ||
| '409': | ||
| description: >- | ||
| The customer's payment provider does not require SCA, or the quote has | ||
| no pending challenge to authorize. | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: ../../components/schemas/errors/Error409.yaml | ||
| '500': | ||
| description: Internal service error | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: ../../components/schemas/errors/Error500.yaml | ||
|
jklein24 marked this conversation as resolved.
|
||
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.