Skip to content

Commit

Permalink
Flytt api auth config sammen med resten av api config
Browse files Browse the repository at this point in the history
Co-authored-by: Giao The Cung <giaothe@gmail.com>
  • Loading branch information
MariusEriksen and gtcno committed May 22, 2024
1 parent b5b8015 commit e269457
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ package no.nav.dagpenger.oppslag.journalpost.id.api
import io.ktor.server.application.Application
import io.ktor.server.application.install
import io.ktor.server.auth.Authentication
import io.ktor.server.auth.jwt.JWTPrincipal
import io.ktor.server.auth.jwt.jwt
import io.ktor.server.plugins.callloging.CallLogging
import io.ktor.server.request.document
import mu.KotlinLogging

private val sikkerLogger = KotlinLogging.logger("tjenestekall")

fun Application.apiConfig() {
install(CallLogging) {
Expand All @@ -22,6 +21,11 @@ fun Application.apiConfig() {
}

install(Authentication) {
jwt("azureAd")
jwt("azureAd") {
verifier(AzureAd)
validate { jwtClaims ->
JWTPrincipal(jwtClaims.payload)
}
}
}
}

This file was deleted.

0 comments on commit e269457

Please sign in to comment.