Skip to content

Commit

Permalink
Bumper komponenter
Browse files Browse the repository at this point in the history
  • Loading branch information
ekun committed Dec 20, 2024
1 parent 742f82a commit b67220b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
3 changes: 1 addition & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ plugins {
}

val ktorVersion = "3.0.2"
val aapLibVersion = "3.7.145"
val behandlingsflytVersjon = "0.0.71"
val postmottakVersjon = "0.0.20"
val komponenterVersjon = "1.0.93"
val komponenterVersjon = "1.0.98"

application {
mainClass.set("tilgang.AppKt")
Expand Down
10 changes: 7 additions & 3 deletions plugin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
val ktorVersion = "3.0.2"
val komponenterVersjon = "1.0.93"
val komponenterVersjon = "1.0.98"

plugins {
id("aap-tilgang.conventions")
Expand Down Expand Up @@ -41,8 +41,9 @@ dependencies {
api(project(":api-kontrakt"))
api(project(":plugin-kontrakt"))

implementation("no.nav.aap.kelvin:httpklient:$komponenterVersjon")
implementation("no.nav.aap.kelvin:infrastructure:$komponenterVersjon")
compileOnly("no.nav.aap.kelvin:httpklient:$komponenterVersjon")
compileOnly("no.nav.aap.kelvin:json:$komponenterVersjon")
compileOnly("no.nav.aap.kelvin:infrastructure:$komponenterVersjon")

implementation("io.ktor:ktor-server-auth-jwt:$ktorVersion")
implementation("ch.qos.logback:logback-classic:1.5.14")
Expand All @@ -64,6 +65,9 @@ dependencies {
implementation("io.ktor:ktor-server-double-receive:$ktorVersion")

testImplementation("no.nav.aap.kelvin:server:$komponenterVersjon")
testImplementation("no.nav.aap.kelvin:httpklient:$komponenterVersjon")
testImplementation("no.nav.aap.kelvin:json:$komponenterVersjon")
testImplementation("no.nav.aap.kelvin:infrastructure:$komponenterVersjon")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.11.3")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.11.3")
testImplementation("org.assertj:assertj-core:3.26.3")
Expand Down
4 changes: 1 addition & 3 deletions plugin/src/main/kotlin/no/nav/aap/tilgang/TilgangPlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ import io.ktor.server.routing.RoutingNode
import io.ktor.util.AttributeKey
import no.nav.aap.komponenter.httpklient.auth.AzpName
import no.nav.aap.komponenter.httpklient.auth.token
import no.nav.aap.komponenter.httpklient.json.DefaultJsonMapper
import no.nav.aap.komponenter.json.DefaultJsonMapper
import org.slf4j.LoggerFactory
import tilgang.Operasjon

const val TILGANG_PLUGIN = "TilgangPlugin"

Expand Down Expand Up @@ -59,7 +58,6 @@ inline fun buildTilgangPlugin(crossinline parse: suspend (call: ApplicationCall)
}
}


suspend inline fun <reified T : Any> ApplicationCall.parseGeneric(): T {
if (T::class == Unit::class) return Unit as T
return DefaultJsonMapper.fromJson<T>(receiveText())
Expand Down

0 comments on commit b67220b

Please sign in to comment.