wso2 / docs-open-banking

Apache License 2.0
39 stars 25 forks source link

[OB2][Berlin] Custom organization ID validation improvement when creating applications #470

Closed Akila94 closed 3 years ago

Akila94 commented 3 years ago

Issue title: [OB2][Berlin] Custom organization ID validation improvement when creating applications.

Existing documentation to be updated: Have to change the 2nd screenshot of the 3rd point (Enter application details) of step 4 (Create an application) of this page. That screenshot doesn't contain the field for entering the organization ID. The same place needs to be improved to add the new configs introduced by this issue.

Description (optional): This issue is created to track this new custom UI level configuration provided for Berlin specification. This real-time validation happens when entering the organization ID when creating the application in Berlin and Israel setups. This applies to the TPP onboarding part of Berlin specification (also applicable for Israel). This is an optional configuration.

Instructions:

To validate the organization ID using a custom regex for Berlin specification, should add the following config in /repository/deployment/jaggeryapps/devportal/site/public/theme/settings.js file.

The regex can be configured as needed. The max input length can be configured for the configured regex as an optional config. If the max input length is not configured, it will be defaulted to 20.

orgIdRegex: '^OB:[A-Z]{2}-[A-Z]{3}-[a-zA-Z0-9]*$',
maxAllowedInputLength: 20

inside openbanking element.

Both of these configs are optional, if not configured, the default regex "^PSD[A-Z]{2}-[A-Z]{2,8}-[[a-zA-Z0-9]*$" will be used without input length validation.

So the final openbanking element will be as follows,

openbanking: {
        spec: 'BERLIN',
        grantTypes: {
            authorization_code: 'Code',
            implicit: 'Implicit',
            refresh_token: 'Refresh Token',
            client_credentials: 'Client Credentials',
        },
        orgIdRegex: '^OB:[A-Z]{2}-[A-Z]{3}-[a-zA-Z0-9]*$',
        maxAllowedInputLength: 20
}

To update the displayed error messages when the validation fails, we have to update the following fields of /repository/deployment/jaggeryapps/devportal/site/public/locales/en.js file as needed,

Affected OB version: OB2

Require server restart? No, updated realtime after the page is refreshed

U2 level: 2.0.0.65

References:

https://github.com/wso2-support/financial-open-banking/pull/1775 https://github.com/wso2-support/financial-open-banking/pull/1776

The WUM update for this has been released on 19th of August, 2021.

Akila94 commented 3 years ago

Closing since this is not related to OB docs.

isharailanga commented 3 years ago

U2 released on 8/11/2021

isharailanga commented 3 years ago

Added the following instructions to the docs: Screenshot from 2021-08-30 17-48-02 Udpated the following pages: