Hi,
I have implemented basic auth in my dropwizard service which is working
correctly via a browser or curl.
I have the following swagger definition:
package web.service.config.swagger.definition;
import io.swagger.jaxrs.config.ReaderListener;
import io.swagger.models.Swagger;
import io.swagger.jaxrs.Reader;
import io.swagger.models.auth.BasicAuthDefinition;
import io.swagger.annotations.SwaggerDefinition;
@SwaggerDefinition
public class SwaggerSecurityDefinition implements ReaderListener {
public static final String BASIC_AUTH_SCHEME = "basic";
@Override
public void beforeScan(Reader reader, Swagger swagger) {
}
@Override
public void afterScan(Reader reader, Swagger swagger) {
BasicAuthDefinition basicAuthDefinition = new BasicAuthDefinition();
//basicAuthDefinition.setDescription("Basic Authentication");
swagger.addSecurityDefinition(BASIC_AUTH_SCHEME,
basicAuthDefinition);
}
But when I click the authorise icon in my swagger UI, I get the following,
just message "Available authorizations" and nothing else:
Please could anybody suggest what I'm doing wrong?
Thanks
--
You received this message because you are subscribed to the Google Groups
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.