diff --git a/src/main/kotlin/no/nav/k9/los/K9Los.kt b/src/main/kotlin/no/nav/k9/los/K9Los.kt index c381af9a3..6a4e17302 100644 --- a/src/main/kotlin/no/nav/k9/los/K9Los.kt +++ b/src/main/kotlin/no/nav/k9/los/K9Los.kt @@ -68,6 +68,7 @@ import no.nav.k9.los.tjenester.saksbehandler.oppgave.OppgaveApis import no.nav.k9.los.tjenester.saksbehandler.saksliste.SaksbehandlerOppgavekoApis import no.nav.k9.los.tjenester.sse.RefreshKlienterWebSocket import no.nav.k9.los.tjenester.sse.SseEvent +import org.koin.core.context.GlobalContext import org.koin.core.qualifier.named import org.koin.ktor.ext.getKoin import org.koin.ktor.plugin.Koin @@ -87,6 +88,7 @@ fun Application.k9Los() { install(Koin) { modules(selectModuleBasedOnProfile(this@k9Los, config = configuration)) + GlobalContext.startKoin(this) } val koin = getKoin() diff --git a/src/test/kotlin/no/nav/k9/los/TestConfiguration.kt b/src/test/kotlin/no/nav/k9/los/TestConfiguration.kt index c029e0016..32ce17618 100644 --- a/src/test/kotlin/no/nav/k9/los/TestConfiguration.kt +++ b/src/test/kotlin/no/nav/k9/los/TestConfiguration.kt @@ -31,13 +31,13 @@ object TestConfiguration { map["nav.auth.clients.size"] = "2" map["nav.auth.clients.0.alias"] = "nais-sts" - map["nav.auth.clients.0.client_id"] = "srvpps-k9-los-api" - map["nav.auth.clients.0.client_secret"] = "very-secret" - map["nav.auth.clients.0.discovery_endpoint"] = - "http://vtp:8060/rest/isso/oauth2/.well-known/openid-configuration" + map["nav.auth.clients.0.client_id"] = "k9-los" + map["nav.auth.clients.0.private_key_jwk"] = ClientCredentials.ClientA.privateKeyJwk + map["nav.auth.clients.0.certificate_hex_thumbprint"] = ClientCredentials.ClientA.certificateHexThumbprint + map["nav.auth.clients.0.discovery_endpoint"] = "http://azure-mock:8100/v2.0/.well-known/openid-configuration" map["nav.auth.clients.1.alias"] = "azure-v2" - map["nav.auth.clients.1.client_id"] = "pleiepengesoknad-prosessering" + map["nav.auth.clients.1.client_id"] = "k9-los" map["nav.auth.clients.1.private_key_jwk"] = ClientCredentials.ClientA.privateKeyJwk map["nav.auth.clients.1.certificate_hex_thumbprint"] = ClientCredentials.ClientA.certificateHexThumbprint map["nav.auth.clients.1.discovery_endpoint"] = "http://azure-mock:8100/v2.0/.well-known/openid-configuration"