Skip to content

OIDC Client: Is it possible? #1227

@melloware

Description

@melloware

@ricardozanini @hbelmiro apologize for opening this ticket but working with @mcruzdev i tried everything to figure this out and now i am starting to not think its possible.

  1. I have a Quarkus REST server using OIDC authentication with KeyCloak. here is the server config.
quarkus.oidc.enabled=true
quarkus.oidc.client-id=my-client-id
quarkus.oidc.auth-server-url=http://localhost:8020/realms/myrealm
  1. It generates this in the OpenAPI JSON:
    "securitySchemes" : {
      "SecurityScheme" : {
        "type" : "openIdConnect",
        "openIdConnectUrl" : "http://localhost:8020/realms/myrealm/.well-known/openid-configuration",
        "description" : "Authentication"
      }
    }
  1. Now I want to use OpenAPIGenerator to generate my client code. I have read all the instructions: https://docs.quarkiverse.io/quarkus-openapi-generator/dev/client.html#_oauth2_authentication I have tried everything and no matter what it errors with cannot find package com..xxx.auth as its not generating the .auth filter.

Questions

Is OIDC supported?

If OIDC is not supported is the idea I need to turn off security quarkus.openapi-generator.codegen.enable-security-generation=false and create my OIDC client code and wire it into my generated code?

Feel free to close this ticket if its not valid but I think this will come up more and more as OIDC is popular.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:clientThis item is related to the client extension

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions