Skip to content

Commit

Permalink
chore: update consentRequests response structure (#95)
Browse files Browse the repository at this point in the history
* chore: update consentRequests response structure

* chore: fix linting issue
  • Loading branch information
sridharvoruganti authored Apr 15, 2021
1 parent 946f458 commit b1929d6
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 12 deletions.
31 changes: 21 additions & 10 deletions src/simulator/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2124,15 +2124,20 @@ components:
properties:
isValid:
type: boolean
authChannels:
type: array
items:
$ref: '#/components/schemas/ConsentRequestChannelType'
authUri:
type: string
description: >-
The callback uri that the pisp app redirects to for user to complete
their login.
data:
type: object
properties:
authChannels:
type: array
items:
$ref: '#/components/schemas/ConsentRequestChannelType'
authUri:
type: string
description: >-
The callback uri that the pisp app redirects to for user to complete
their login.
errorInformation:
$ref: '#/components/schemas/ErrorInformation'
UserName:
title: UserName
type: string
Expand All @@ -2147,7 +2152,13 @@ components:
title: Message
type: string
description: OTP value or error message

ErrorInformation:
type: object
properties:
errorCode:
type: string
errorDescription:
type: string
SendOTPRequest:
title: SendOTPRequest
type: object
Expand Down
6 changes: 4 additions & 2 deletions src/simulator/handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,10 @@ const validateConsentRequests = async (ctx) => {
// default mock reponse, if rules not configured
const res = {
isValid: true,
authChannels: ['WEB'],
authUri: `dfspa.com/authorize?consentRequestId=${request.id}`,
data: {
authChannels: ['WEB'],
authUri: `dfspa.com/authorize?consentRequestId=${request.id}`,
},
};
ctx.state.logger.log(`validateConsentRequests is returning body: ${util.inspect(res)}`);
ctx.response.body = res;
Expand Down

0 comments on commit b1929d6

Please sign in to comment.