Skip to content

Commit c5fec94

Browse files
authored
APE-1984 | Testing tool to include flag - Use credentials flow only -Type2TPPcallback tester id and Type2Tokencallback (#436)
1 parent 90e768e commit c5fec94

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

tpp/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@token-io/tpp",
3-
"version": "1.0.70",
3+
"version": "1.0.71",
44
"description": "Token JavaScript TPP SDK",
55
"license": "ISC",
66
"author": {

tpp/src/http/AuthHttpClient.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,15 +478,19 @@ class AuthHttpClient extends CoreAuthHttpClient {
478478
* @param {string} tokenRequestId Token request id
479479
* @param {Object} credentials map of credentials
480480
* @param {boolean} consentAccepted if consent accepted by user/payer
481+
* @param {boolean} useCredentialFlow Use credential flow
482+
* @param {boolean} useWebappCredentialsFlow Use webapp credentials flow
481483
* @returns {Object} response to the api call
482484
*/
483-
async initiateBankAuthorization(tokenRequestId, credentials, consentAccepted){
485+
async initiateBankAuthorization(tokenRequestId, credentials, consentAccepted = false, useCredentialFlow = false, useWebappCredentialsFlow = false){
484486
const request = {
485487
method: 'post',
486488
url: `/token-requests/${tokenRequestId}/authorization`,
487489
data: {
488490
credentials,
489491
consentAccepted,
492+
useCredentialFlow,
493+
useWebappCredentialsFlow,
490494
},
491495
};
492496
return this._instance(request);

tpp/src/main/TokenRequestBuilder.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,4 +222,15 @@ export default class TokenRequestBuilder {
222222
this.requestPayload.disableFutureDatedPaymentConversion = disableFutureDatedPaymentConversion;
223223
return this;
224224
}
225+
226+
/**
227+
* Sets use credential flow as bool flag in the payload
228+
*
229+
* @param useCredentialFlow
230+
* @return TokenRequestBuilder
231+
*/
232+
setUseCredentialFlow(useCredentialFlow: boolean): TokenRequestBuilder {
233+
this.requestPayload.useCredentialFlow = useCredentialFlow;
234+
return this;
235+
}
225236
}

0 commit comments

Comments
 (0)