Add control to login?

I wanted to add a drop down list to the login screen. This list would be populated with data based on the url and path. The user would have to select an item from this list in addition to entering their username and password. The selected value would be passed to the login mechanism along with the username and password. How can this be accomplished with ServiceStack’s Swagger support?

It wouldn’t, why would Swagger have anything to do with this? What you’re describing sounds like a Custom Login UI.

Do you mean you want to change the Swagger Login UI? The only 2 supported security methods are Bearer and Basic Auth.

The customization options are documented in the OpenAPI Docs where you can override existing Swagger UI assets by copying and modifying them locally.

In addition you can inject custom JavaScript by having a patch-preload.js patch.js file which get loaded before and after swagger UI loads itself with window.swaggerUi.load(). You’ll have to do any customizations you need via one of these customization options.