Skip to main content

OpenAPI Extensions for Consent Management

WSO2 Open Banking IAM Accelerator v4.0.0 onwards supports OpenAPI based extensions for consent management customizations.

Generally, regional open banking specifications have different flavors of request/response formats for consent management endpoints which cover consent creation, update, retrieval, and revoke.

At the accelerator level, it has identified possible customization points used for specification compliances and those extension points can be implemented by the specification compliance layer as a REST API in a preferred programming language and deployed externally to WSO2 Identity Server.

note

Make sure to refer to the Developer guide for OpenAPI- based extensions from the documentation.

OpenAPI Extensions​

OpenAPI ExtensionDescriptionOpenAPI Definition
pre-process-consent-creationHandle specification-specific validations and obtain custom consent data to be storedpre-process-consent-creation/post
enrich-consent-creation-responseHandle altering consent response according to specificationenrich-consent-creation-response/post
pre-process-consent-file-uploadHandle specification-specific validations related to consent file upload requestspre-process-consent-file-upload/post
enrich-consent-file-responseHandle altering consent file upload responseenrich-consent-file-response/post
pre-process-consent-retrievalHandle specification-specific validations and alter consent retrieval responsepre-process-consent-retrieval/post
validate-consent-file-retrievalHandle specification-specific validations for consent file retrievalvalidate-consent-file-retrieval/post
pre-process-consent-revokeHandle specification-specific validations and alter consent revoke responsepre-process-consent-revoke/post

Configuration​

To enable, follow the steps below:

  1. Open the <IS_HOME>/repository/conf/deployment.toml file.

  2. Locate the following tag and enable it as below. Make sure allowed_extensions contains the OpenAPI extensions mentioned in the above table.

    [financial_services.extensions.endpoint]
    enabled = true
    base_url = "<BASE_URL_OF_THE_EXTENSION>"
    allowed_extensions = [
    "pre_process_consent_creation",
    "enrich_consent_creation_response",
    "pre_process_consent_retrieval",
    "pre_process_consent_file_upload",
    "enrich_consent_file_response",
    "pre_process_consent_revoke",
    "validate_consent_file_retrieval"
    ]

    [financial_services.extensions.endpoint.security]
    # supported types : Basic-Auth or OAuth2
    type = "Basic-Auth"
    username = ""
    password = ""

Was this page helpful?