Browse Source

Try defining openapi defintion on app

35-pssaas-kerberos-bypass
Jonathan Christison 2 years ago
parent
commit
ec1528cef8
  1. 49
      src/main/java/com/redhat/pctsec/rest/v1alpha1/OshWrapperApiApplication.java

49
src/main/java/com/redhat/pctsec/rest/v1alpha1/OshWrapperApiApplication.java

@ -0,0 +1,49 @@
package com.redhat.pctsec.rest.v1alpha1;
import jakarta.ws.rs.core.Application;
import org.eclipse.microprofile.openapi.annotations.Components;
import org.eclipse.microprofile.openapi.annotations.OpenAPIDefinition;
import org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType;
import org.eclipse.microprofile.openapi.annotations.info.Contact;
import org.eclipse.microprofile.openapi.annotations.info.Info;
import org.eclipse.microprofile.openapi.annotations.info.License;
import org.eclipse.microprofile.openapi.annotations.security.SecurityRequirement;
import org.eclipse.microprofile.openapi.annotations.security.SecurityScheme;
import org.eclipse.microprofile.openapi.annotations.tags.Tag;
@OpenAPIDefinition(
tags = {
//@Tag(name="widget", description="Widget operations."),
//@Tag(name="gasket", description="Operations related to gaskets")
},
info = @Info(
title="Example API",
version = "1.0.1",
contact = @Contact(
name = "Example API Support",
url = "http://exampleurl.com/contact",
email = "techsupport@example.com"),
license = @License(
name = "Apache 2.0",
url = "https://www.apache.org/licenses/LICENSE-2.0.html")),
components = @Components(
securitySchemes = {
@SecurityScheme(
securitySchemeName = "Kerberos",
type = SecuritySchemeType.HTTP,
scheme = "Negotiate"
//bearerFormat = "JWT"
),
@SecurityScheme(
securitySchemeName = "basic",
type = SecuritySchemeType.HTTP,
scheme = "basic"
)
}
),
security = {
@SecurityRequirement(name = "Kerberos"),
@SecurityRequirement(name = "basic")
}
)
public class OshWrapperApiApplication extends Application {
}
Loading…
Cancel
Save