add security requirements

This commit is contained in:
Eduard Heimbuch
2020-02-18 10:13:01 +01:00
parent b7e95f3cc4
commit 1ff0c46b0e

View File

@@ -1,6 +1,8 @@
package sonia.scm.api.v2.resources;
import com.webcohesion.enunciate.metadata.rs.TypeHint;
import io.swagger.v3.oas.annotations.OpenAPIDefinition;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import sonia.scm.security.AllowAnonymousAccess;
import sonia.scm.web.VndMediaType;
@@ -9,6 +11,10 @@ import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
@OpenAPIDefinition(security = {
@SecurityRequirement(name = "Basic Authentication"),
@SecurityRequirement(name = "Bearer Token Authentication")
})
@Path(IndexResource.INDEX_PATH_V2)
@AllowAnonymousAccess
public class IndexResource {