Skip to content

Evaluation of swaggerui plug configuration at runtime #492

Open
@D4no0

Description

@D4no0

I am using the on_complete option provided by swaggerui plug to preauthorize both basic auth and api key. While I can do this with the basic auth:

function() {
          ui.preauthorizeBasic("basicAuth", "test@mail.com", "123123");
}

I cannot do the same with the api key, since the tokens are generated and tracked in database, so I have to use the database to request the api key, however this is not possible because the plug options are evaluated at compile-time.

I also noticed the option config_url that can be passed for swaggerui to fetch configuration from an url. The problem here however is the same, because the plug options are defined in router, there is no way for me to generate a url that I will be able to serve from this server with dynamic configuration.

Is there any way around this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions