I have a JAX-RS app using MP-OpenApi to provide an OpenAPI UI using OpenLiberty. My API is authenticated using OAuth2 implicit flow. This is currently configured using annotations, like this:
@SecurityScheme(
securitySchemeName = JaxRsApplication.OAUTH2_SECURITY_SCHEME_NAME,
type = SecuritySchemeType.OAUTH2,
flows = @OAuthFlows(
implicit = @OAuthFlow(
authorizationUrl = "https://auth-server/connect/authorize",
scopes = @OAuthScope(name = "some-api-scope", description = "Some API Scope"))))
My goal is to configure the authorizationUrl value in a config file instead of hardcoding it within an annotation, so that I can configure this for different server environments as a CI/CD step. Can this be done?
Also, is there a way to select some scopes and automatically populate the client id in the OpenAPI UI?
Cheers.