Skip to content

Commit

Permalink
Add SecurityScheme to OpenApi config.
Browse files Browse the repository at this point in the history
  • Loading branch information
oyvind-wedoe committed Dec 12, 2024
1 parent 67df288 commit 61f7bf7
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package no.nav.klage.innsyn.api.controller

import io.swagger.v3.oas.annotations.Operation
import io.swagger.v3.oas.annotations.enums.SecuritySchemeIn
import io.swagger.v3.oas.annotations.enums.SecuritySchemeType
import io.swagger.v3.oas.annotations.security.SecurityScheme
import io.swagger.v3.oas.annotations.tags.Tag
import no.nav.klage.innsyn.api.view.InnsynResponse
import no.nav.klage.innsyn.service.InnsynService
Expand Down Expand Up @@ -31,6 +34,8 @@ import java.nio.file.Files

@ProtectedWithClaims(issuer = SecurityConfiguration.TOKEN_X, claimMap = ["acr=Level4"])
@RequestMapping("api/innsyn")
@SecurityScheme(name = "bearer-auth", type = SecuritySchemeType.HTTP, scheme = "bearer",
`in` = SecuritySchemeIn.HEADER, bearerFormat = "JWT")
class InnsynController(
private val innsynService: InnsynService,
private val tokenUtil: TokenUtil,
Expand Down

0 comments on commit 61f7bf7

Please sign in to comment.