Skip to content

Commit dbc8c90

Browse files
committed
Fjernet oppslagklient
navikt/dagpenger#539
1 parent ce2fa99 commit dbc8c90

File tree

6 files changed

+4
-430
lines changed

6 files changed

+4
-430
lines changed

dp-inntekt-api/src/main/kotlin/no/nav/dagpenger/inntekt/Application.kt

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,10 @@ import io.prometheus.client.hotspot.DefaultExports
99
import kotlinx.coroutines.launch
1010
import kotlinx.coroutines.runBlocking
1111
import mu.KotlinLogging
12-
import no.finn.unleash.DefaultUnleash
1312
import no.nav.dagpenger.inntekt.db.PostgresInntektStore
1413
import no.nav.dagpenger.inntekt.db.dataSourceFrom
1514
import no.nav.dagpenger.inntekt.db.migrate
1615
import no.nav.dagpenger.inntekt.inntektskomponenten.v1.InntektskomponentHttpClient
17-
import no.nav.dagpenger.inntekt.oppslag.OppslagClient
18-
import no.nav.dagpenger.inntekt.oppslag.UnleashedPersonOppslag
1916
import no.nav.dagpenger.inntekt.oppslag.enhetsregister.EnhetsregisterClient
2017
import no.nav.dagpenger.inntekt.oppslag.enhetsregister.httpClient
2118
import no.nav.dagpenger.inntekt.oppslag.pdl.PdlGraphQLClientFactory
@@ -50,26 +47,17 @@ fun main() {
5047
config.application.password
5148
)
5249

53-
val pdl = PdlGraphQLRepository(
50+
val pdlPersonOppslag = PdlGraphQLRepository(
5451
client = PdlGraphQLClientFactory(
5552
url = config.pdl.url,
5653
oidcProvider = { stsOidcClient.oidcToken().access_token }
5754
)
5855
)
59-
6056
val enhetsregisterClient = EnhetsregisterClient(
6157
baseUrl = config.enhetsregisteretUrl.url,
6258
httpClient = httpClient()
6359
)
6460

65-
val oppslagClient = OppslagClient(config.application.oppslagUrl, stsOidcClient)
66-
67-
val unleashedPersonOppslag = UnleashedPersonOppslag(
68-
unleash = DefaultUnleash(config.application.unleashConfig),
69-
pdlPersonOppslag = pdl,
70-
legacyPersonOppslag = oppslagClient
71-
)
72-
7361
val inntektskomponentHttpClient = InntektskomponentHttpClient(
7462
config.application.hentinntektListeUrl,
7563
stsOidcClient
@@ -111,7 +99,7 @@ fun main() {
11199
inntektskomponentHttpClient,
112100
postgresInntektStore,
113101
cachedInntektsGetter,
114-
unleashedPersonOppslag,
102+
pdlPersonOppslag,
115103
authApiKeyVerifier,
116104
jwkProvider,
117105
enhetsregisterClient,
@@ -128,7 +116,7 @@ fun main() {
128116
)
129117
}
130118

131-
// Cleans up unused inntekt on a regular interbal
119+
// Cleans up unused inntekt on a regular interval
132120
Vaktmester(dataSource).also {
133121
fixedRateTimer(
134122
name = "vaktmester",

dp-inntekt-api/src/main/kotlin/no/nav/dagpenger/inntekt/Configuration.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ private val localProperties = ConfigurationMap(
2424
"application.httpPort" to "8099",
2525
"hentinntektliste.url" to "https://localhost/inntektskomponenten-ws/rs/api/v1/hentinntektliste",
2626
"enhetsregisteret.url" to "https://data.brreg.no/enhetsregisteret/api",
27-
"oppslag.url" to "https://localhost:8090/api",
2827
"oidc.sts.issuerurl" to "http://localhost/",
2928
"jwks.url" to "https://localhost",
3029
"jwks.issuer" to "https://localhost",
@@ -49,7 +48,6 @@ private val devProperties = ConfigurationMap(
4948
"vault.mountpath" to "postgresql/preprod-fss/",
5049
"hentinntektliste.url" to "https://app-q1.adeo.no/inntektskomponenten-ws/rs/api/v1/hentinntektliste",
5150
"enhetsregisteret.url" to "https://data.brreg.no/enhetsregisteret/api",
52-
"oppslag.url" to "http://dagpenger-oppslag.default.svc.nais.local/api",
5351
"oidc.sts.issuerurl" to "https://security-token-service.nais.preprod.local/",
5452
"jwks.url" to "https://isso-q.adeo.no:443/isso/oauth2/connect/jwk_uri",
5553
"jwks.issuer" to "https://isso-q.adeo.no:443/isso/oauth2",
@@ -71,7 +69,6 @@ private val prodProperties = ConfigurationMap(
7169
"vault.mountpath" to "postgresql/prod-fss/",
7270
"hentinntektliste.url" to "https://app.adeo.no/inntektskomponenten-ws/rs/api/v1/hentinntektliste",
7371
"enhetsregisteret.url" to "https://data.brreg.no/enhetsregisteret/api",
74-
"oppslag.url" to "http://dagpenger-oppslag.default.svc.nais.local/api",
7572
"oidc.sts.issuerurl" to "https://security-token-service.nais.adeo.no/",
7673
"jwks.url" to "https://isso.adeo.no:443/isso/oauth2/connect/jwk_uri",
7774
"jwks.issuer" to "https://isso.adeo.no:443/isso/oauth2",
@@ -130,7 +127,6 @@ data class Configuration(
130127
val password: String = config()[Key("srvdp.inntekt.api.password", stringType)],
131128
val hentinntektListeUrl: String = config()[Key("hentinntektliste.url", stringType)],
132129
val enhetsregisteretUrl: String = config()[Key("enhetsregisteret.url", stringType)],
133-
val oppslagUrl: String = config()[Key("oppslag.url", stringType)],
134130
val oicdStsUrl: String = config()[Key("oidc.sts.issuerurl", stringType)],
135131
val jwksUrl: String = config()[Key("jwks.url", stringType)],
136132
val jwksIssuer: String = config()[Key("jwks.issuer", stringType)],

dp-inntekt-api/src/main/kotlin/no/nav/dagpenger/inntekt/oppslag/OppslagClient.kt

Lines changed: 0 additions & 168 deletions
This file was deleted.

dp-inntekt-api/src/main/kotlin/no/nav/dagpenger/inntekt/oppslag/UnleashedPersonOppslag.kt

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)