Skip to content
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

test: add e2e tests for consentRequests #131

Merged
merged 6 commits into from
Apr 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
267 changes: 267 additions & 0 deletions docker-local/dfsp_a/rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,272 @@
]
}
}
},
{
"ruleId": 4,
"description": "validate consentRequests- WEB",
"conditions": {
"all": [
{
"fact": "path",
"operator": "equal",
"value": "/validateConsentRequests"
},
{
"fact": "method",
"operator": "equal",
"value": "POST"
},
{
"fact": "body",
"operator": "equal",
"value": "b51ec534-ee48-4575-b6a9-ead2955b8069",
"path": ".id"
}
]
},
"event": {
"type": "FIXED_CALLBACK",
"params": {
"statusCode": 200,
"body": {
"isValid": true,
"data": {
"authChannels": [
"WEB"
],
"authUri": "dfspa.com/authorize?consentRequestId=b51ec534-ee48-4575-b6a9-ead2955b8069"
}
}
}
}
},
{
"ruleId": 5,
"description": "validate consentRequests -OTP",
"conditions": {
"all": [
{
"fact": "path",
"operator": "equal",
"value": "/validateConsentRequests"
},
{
"fact": "method",
"operator": "equal",
"value": "POST"
},
{
"fact": "body",
"operator": "equal",
"value": "c51ec534-ee48-4575-b6a9-ead2955b8069",
"path": ".id"
}
]
},
"event": {
"type": "FIXED_CALLBACK",
"params": {
"statusCode": 200,
"body": {
"isValid": true,
"data": {
"authChannels": [
"OTP"
]
}
}
}
}
},
{
"ruleId": 6,
"description": "validate consentRequests -Error:7203",
"conditions": {
"all": [
{
"fact": "path",
"operator": "equal",
"value": "/validateConsentRequests"
},
{
"fact": "method",
"operator": "equal",
"value": "POST"
},
{
"fact": "body",
"operator": "equal",
"value": "d51ec534-ee48-4575-b6a9-ead2955b8069",
"path": ".id"
}
]
},
"event": {
"type": "FIXED_CALLBACK",
"params": {
"statusCode": 200,
"body": {
"isValid": false,
"data": {},
"errorInformation": {
"errorCode": "7203",
"errorDescription": "FSP does not support any requested authentication channels"
}
}
}
}
},
{
"ruleId": 7,
"description": "validate consentRequests -Error:7204",
"conditions": {
"all": [
{
"fact": "path",
"operator": "equal",
"value": "/validateConsentRequests"
},
{
"fact": "method",
"operator": "equal",
"value": "POST"
},
{
"fact": "body",
"operator": "equal",
"value": "e51ec534-ee48-4575-b6a9-ead2955b8069",
"path": ".id"
}
]
},
"event": {
"type": "FIXED_CALLBACK",
"params": {
"statusCode": 200,
"body": {
"isValid": false,
"data": {},
"errorInformation": {
"errorCode": "7204",
"errorDescription": "FSP does not support any requested scope actions"
}
}
}
}
},
{
"ruleId": 8,
"description": "validate consentRequests -Error:7209",
"conditions": {
"all": [
{
"fact": "path",
"operator": "equal",
"value": "/validateConsentRequests"
},
{
"fact": "method",
"operator": "equal",
"value": "POST"
},
{
"fact": "body",
"operator": "equal",
"value": "f51ec534-ee48-4575-b6a9-ead2955b8069",
"path": ".id"
}
]
},
"event": {
"type": "FIXED_CALLBACK",
"params": {
"statusCode": 200,
"body": {
"isValid": false,
"data": {},
"errorInformation": {
"errorCode": "7209",
"errorDescription": "FSP does not find scopes suitable"
}
}
}
}
},
{
"ruleId": 9,
"description": "validate consentRequests -Error:7210",
"conditions": {
"all": [
{
"fact": "path",
"operator": "equal",
"value": "/validateConsentRequests"
},
{
"fact": "method",
"operator": "equal",
"value": "POST"
},
{
"fact": "body",
"operator": "equal",
"value": "f61ec534-ee48-4575-b6a9-ead2955b8069",
"path": ".id"
}
]
},
"event": {
"type": "FIXED_CALLBACK",
"params": {
"statusCode": 200,
"body": {
"isValid": false,
"data": {},
"errorInformation": {
"errorCode": "7210",
"errorDescription": "FSP does not trust PISP callback URI"
}
}
}
}
},
{
"ruleId": 10,
"description": "validate consentRequests -Error:7211",
"conditions": {
"all": [
{
"fact": "path",
"operator": "equal",
"value": "/validateConsentRequests"
},
{
"fact": "method",
"operator": "equal",
"value": "POST"
},
{
"fact": "body",
"operator": "equal",
"value": "f71ec534-ee48-4575-b6a9-ead2955b8069",
"path": ".id"
}
]
},
"event": {
"type": "FIXED_CALLBACK",
"params": {
"statusCode": 200,
"body": {
"isValid": false,
"data": {},
"errorInformation": {
"errorCode": "7211",
"errorDescription": "FSP does not allow consent requests for specified username"
}
}
}
}
}
]
Loading