Skip to content

Commit

Permalink
refactor!: remove default from FAPI profile configuration
Browse files Browse the repository at this point in the history
BREAKING CHANGE: `features.fapi.profile` is now a required configuration option when `features.fapi.enabled` is `true`.
  • Loading branch information
panva committed Dec 1, 2022
1 parent f33036a commit 0f93b8c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1103,7 +1103,7 @@ _**default value**_:
```js
{
enabled: false,
profile: '1.0 Final'
profile: undefined
}
```

Expand All @@ -1113,14 +1113,14 @@ _**default value**_:
#### profile

The specific profile of FAPI to enable. Supported values are:
- '1.0 Final' (default) Enables behaviours from [Financial-grade API Security Profile 1.0 - Part 2: Advanced](https://openid.net/specs/openid-financial-api-part-2-1_0.html)
- '1.0 Final' Enables behaviours from [Financial-grade API Security Profile 1.0 - Part 2: Advanced](https://openid.net/specs/openid-financial-api-part-2-1_0.html)
- '1.0 ID2' Enables behaviours from [Financial-grade API - Part 2: Read and Write API Security Profile - Implementer's Draft 02](https://openid.net/specs/openid-financial-api-part-2-ID2.html)
- Function returning one of the other supported values, or undefined if FAPI behaviours are to be ignored. The function is invoked with two arguments `(ctx, client)` and serves the purpose of allowing the used profile to be context-specific.


_**default value**_:
```js
'1.0 Final'
undefined
```

</details>
Expand Down
4 changes: 2 additions & 2 deletions lib/helpers/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -1275,11 +1275,11 @@ function makeDefaults() {
*
* description: The specific profile of FAPI to enable. Supported values are:
*
* - '1.0 Final' (default) Enables behaviours from [Financial-grade API Security Profile 1.0 - Part 2: Advanced](https://openid.net/specs/openid-financial-api-part-2-1_0.html)
* - '1.0 Final' Enables behaviours from [Financial-grade API Security Profile 1.0 - Part 2: Advanced](https://openid.net/specs/openid-financial-api-part-2-1_0.html)
* - '1.0 ID2' Enables behaviours from [Financial-grade API - Part 2: Read and Write API Security Profile - Implementer's Draft 02](https://openid.net/specs/openid-financial-api-part-2-ID2.html)
* - Function returning one of the other supported values, or undefined if FAPI behaviours are to be ignored. The function is invoked with two arguments `(ctx, client)` and serves the purpose of allowing the used profile to be context-specific.
*/
profile: '1.0 Final',
profile: undefined,
},

/*
Expand Down
1 change: 1 addition & 0 deletions test/fapi/fapi-final.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export const keypair = crypto.generateKeyPairSync('ec', { namedCurve: 'P-256' })
merge(config.features, {
fapi: {
enabled: true,
profile: '1.0 Final',
},
jwtResponseModes: { enabled: true },
requestObjects: {
Expand Down

0 comments on commit 0f93b8c

Please sign in to comment.