File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
src/main/kotlin/no/nav/tms/varsel/api/varsel Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,8 @@ import io.ktor.server.routing.post
11
11
import io.ktor.util.pipeline.PipelineContext
12
12
import kotlinx.serialization.Serializable
13
13
import no.nav.tms.token.support.idporten.sidecar.user.IdportenUserFactory
14
-
14
+ import no.nav.tms.token.support.tokenx.validation.user.TokenXUser
15
+ import no.nav.tms.token.support.tokenx.validation.user.TokenXUserFactory
15
16
16
17
fun Route.varsel (
17
18
varselConsumer : VarselConsumer
@@ -36,7 +37,7 @@ fun Route.varsel(
36
37
37
38
get(" alle" ){
38
39
varselConsumer.getAlleVarsler(
39
- userToken = call.userToken ,
40
+ userToken = call.tokenXUser.tokenString ,
40
41
preferertSpraak = call.request.preferertSpraak
41
42
).let { alleVarsler ->
42
43
call.respond(HttpStatusCode .OK , alleVarsler)
@@ -66,6 +67,8 @@ fun Route.varsel(
66
67
}
67
68
68
69
private val ApplicationCall .userToken get() = IdportenUserFactory .createIdportenUser(this ).tokenString
70
+ private val ApplicationCall .tokenXUser get() = TokenXUserFactory .createTokenXUser(this )
71
+
69
72
70
73
@Serializable
71
74
data class AntallVarsler (val beskjeder : Int , val oppgaver : Int , val innbokser : Int )
You can’t perform that action at this time.
0 commit comments