You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Gaëtan Pitteloud (Jira)" <ji...@apache.org> on 2025/11/11 14:37:00 UTC

[jira] [Updated] (CXF-9175) support OAuth2 config in OpenApiFeature

     [ https://issues.apache.org/jira/browse/CXF-9175?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gaëtan Pitteloud updated CXF-9175:
----------------------------------
    Description: 
The OpenApiFeature could support a way to configure OAuth2 as specified in [https://swagger.io/docs/open-source-tools/swagger-ui/usage/oauth2/]

Proposal:
 # New SwaggerOAuth2Config data class with all properties defined on the above swagger page (clientId, clientSecret, ...)
 # Existing SwaggerUiConfig contains a new field of type SwaggerOAuth2Config, so that OAuth2 can be configured while creating the OpenApiFeature
 # While serving swagger-initializer.js resource, the existing SwaggerUiService reads that config and injects the SwaggerOAuth2Config as json into a new init() method before rendering the js resource. This is similar to the existing behavior for injecting the URL in case queryConfigEnabled is false.

PR follows.

  was:
The OpenApiFeature could support a way to configure OAuth2 as specified in [https://swagger.io/docs/open-source-tools/swagger-ui/usage/oauth2/.|https://swagger.io/docs/open-source-tools/swagger-ui/usage/oauth2/]

Proposal:
 # New SwaggerOAuth2Config data class with all properties defined on the above swagger page (clientId, clientSecret, ...)
 # Existing SwaggerUiConfig contains a new field of type SwaggerOAuth2Config, so that OAuth2 can be configured while creating the OpenApiFeature
 # While serving swagger-initializer.js resource, the existing SwaggerUiService reads that config and injects the SwaggerOAuth2Config as json into a new init() method before rendering the js resource. This is similar to the existing behavior for injecting the URL in case queryConfigEnabled is false.

PR follows.


> support OAuth2 config in OpenApiFeature
> ---------------------------------------
>
>                 Key: CXF-9175
>                 URL: https://issues.apache.org/jira/browse/CXF-9175
>             Project: CXF
>          Issue Type: Improvement
>    Affects Versions: 4.1.3
>            Reporter: Gaëtan Pitteloud
>            Priority: Major
>              Labels: openapi
>
> The OpenApiFeature could support a way to configure OAuth2 as specified in [https://swagger.io/docs/open-source-tools/swagger-ui/usage/oauth2/]
> Proposal:
>  # New SwaggerOAuth2Config data class with all properties defined on the above swagger page (clientId, clientSecret, ...)
>  # Existing SwaggerUiConfig contains a new field of type SwaggerOAuth2Config, so that OAuth2 can be configured while creating the OpenApiFeature
>  # While serving swagger-initializer.js resource, the existing SwaggerUiService reads that config and injects the SwaggerOAuth2Config as json into a new init() method before rendering the js resource. This is similar to the existing behavior for injecting the URL in case queryConfigEnabled is false.
> PR follows.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)