Created
June 3, 2020 20:07
-
-
Save dmi3coder/5294639129f955d0486db33f035acc04 to your computer and use it in GitHub Desktop.
Example of Swagger jwt auth Application class
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.quarkify; | |
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.Info; | |
import org.eclipse.microprofile.openapi.annotations.security.SecurityRequirement; | |
import org.eclipse.microprofile.openapi.annotations.security.SecurityScheme; | |
import javax.ws.rs.core.Application; | |
@OpenAPIDefinition( | |
info = @Info( | |
title = "Downwork API", | |
version = "1.0.0" | |
), | |
components = @Components( | |
securitySchemes = { | |
@SecurityScheme( | |
securitySchemeName = "bearerAuth", | |
type = SecuritySchemeType.HTTP, | |
scheme = "bearer", | |
bearerFormat = "JWT" | |
) | |
} | |
), | |
security = { | |
@SecurityRequirement( | |
name = "bearerAuth" | |
) | |
} | |
) | |
public class DownworkApplication extends Application { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment