Skip to content

Commit 6801710

Browse files
fjern aap-endepunkt(ikke lenger i bruk)
1 parent 304babf commit 6801710

File tree

7 files changed

+1
-37
lines changed

7 files changed

+1
-37
lines changed

nais/dev-gcp/nais.yaml

-6
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ spec:
5555
- application: tms-mikrofrontend-selector
5656
- application: meldekort-api-q2
5757
namespace: meldekort
58-
- application: soknad-api
59-
namespace: aap
6058
- application: veilarboppfolging
6159
namespace: pto
6260
cluster: dev-fss
@@ -68,10 +66,6 @@ spec:
6866
value: http://tms-statistikk
6967
- name: STATISTIKK_CLIENT_ID
7068
value: dev-gcp.min-side.tms-statistikk
71-
- name: AAP_BASE_URL
72-
value: http://soknad-api.aap
73-
- name: AAP_CLIENT_ID
74-
value: dev-gcp:aap:soknad-api
7569
- name: CORS_ALLOWED_ORIGINS
7670
value: "*.dev.nav.no"
7771
- name: CORS_ALLOWED_SCHEMES

nais/prod-gcp/nais.yaml

-6
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ spec:
5353
- application: tms-mikrofrontend-selector
5454
- application: meldekort-api
5555
namespace: meldekort
56-
- application: soknad-api
57-
namespace: aap
5856
- application: veilarboppfolging
5957
namespace: pto
6058
cluster: prod-fss
@@ -66,10 +64,6 @@ spec:
6664
value: http://tms-statistikk
6765
- name: STATISTIKK_CLIENT_ID
6866
value: prod-gcp.min-side.tms-statistikk
69-
- name: AAP_BASE_URL
70-
value: http://soknad-api.aap
71-
- name: AAP_CLIENT_ID
72-
value: prod-gcp:aap:soknad-api
7367
- name: CORS_ALLOWED_ORIGINS
7468
value: www.nav.no
7569
- name: CORS_ALLOWED_SCHEMES

src/main/kotlin/no/nav/tms/min/side/proxy/Application.kt

-4
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ fun main() {
2929
data class AppConfiguration(
3030
val corsAllowedOrigins: String = StringEnvVar.getEnvVar("CORS_ALLOWED_ORIGINS"),
3131
val corsAllowedSchemes: String = StringEnvVar.getEnvVar("CORS_ALLOWED_SCHEMES"),
32-
private val aapBaseUrl: String = StringEnvVar.getEnvVar("AAP_BASE_URL"),
33-
private val aapClientId: String = StringEnvVar.getEnvVar("AAP_CLIENT_ID"),
3432
private val meldekortClientId: String = StringEnvVar.getEnvVar("MELDEKORT_CLIENT_ID"),
3533
private val meldekortBaseUrl: String = StringEnvVar.getEnvVar("MELDEKORT_BASE_URL"),
3634
private val utkastClientId: String = StringEnvVar.getEnvVar("UTKAST_CLIENT_ID"),
@@ -82,8 +80,6 @@ data class AppConfiguration(
8280

8381
val externalContentFetcher = ExternalContentFetcher(
8482
proxyHttpClient = proxyHttpClient,
85-
aapClientId = aapClientId,
86-
aapBaseUrl = aapBaseUrl,
8783
meldekortClientId = meldekortClientId,
8884
meldekortBaseUrl = meldekortBaseUrl,
8985
aiaBaseUrl = aiaBaseUrl,

src/main/kotlin/no/nav/tms/min/side/proxy/ExternalContentFetcher.kt

-10
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,11 @@ import io.ktor.client.statement.HttpResponse
44

55
class ExternalContentFetcher(
66
private val proxyHttpClient: ProxyHttpClient,
7-
private val aapClientId: String,
8-
private val aapBaseUrl: String,
97
private val meldekortClientId: String,
108
private val meldekortBaseUrl: String,
119
private val aiaBaseUrl: String,
1210
private val aiaClientId: String,
1311
) {
14-
suspend fun getAapContent(token: String, proxyPath: String?): HttpResponse =
15-
proxyHttpClient.getContent(
16-
userToken = token,
17-
targetAppId = aapClientId,
18-
baseUrl = aapBaseUrl,
19-
proxyPath = proxyPath,
20-
)
21-
2212
suspend fun getMeldekortContent(token: String, proxyPath: String?): HttpResponse =
2313
proxyHttpClient.getContent(
2414
userToken = token,

src/main/kotlin/no/nav/tms/min/side/proxy/proxyRoutes.kt

-5
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,6 @@ private val log = KotlinLogging.logger {}
1515
private val securelog = KotlinLogging.logger("secureLog")
1616
fun Route.proxyRoutes(contentFetcher: ContentFetcher, externalContentFetcher: ExternalContentFetcher) {
1717

18-
get("/aap/{proxyPath...}") {
19-
val response = externalContentFetcher.getAapContent(accessToken, proxyPath)
20-
call.respondBytes(response.readBytes(), response.contentType(), response.status)
21-
}
22-
2318
get("/utkast/{proxyPath...}") {
2419
val response = contentFetcher.getUtkastContent(accessToken, proxyPath)
2520
call.respondBytes(response.readBytes(), response.contentType(), response.status)

src/test/kotlin/no/nav/tms/min/side/proxy/GetRoutesTest.kt

+1-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import org.junit.jupiter.params.provider.ValueSource
2020
class GetRoutesTest {
2121
private val testParametersMap =
2222
mapOf(
23-
"aap" to TestParameters("http://aap.test"),
2423
"meldekort" to TestParameters("http://meldekort.test"),
2524
"utkast" to TestParameters("http://utkast.test"),
2625
"personalia" to TestParameters("http://personalia.test"),
@@ -39,7 +38,7 @@ class GetRoutesTest {
3938

4039

4140
@ParameterizedTest
42-
@ValueSource(strings = ["aap", "utkast", "meldekort", "selector", "aia"])
41+
@ValueSource(strings = [ "utkast", "meldekort", "selector", "aia"])
4342
fun `proxy get api`(tjenestePath: String) = testApplication {
4443
val applicationhttpClient = testApplicationHttpClient()
4544
val proxyHttpClient = ProxyHttpClient(applicationhttpClient, tokendigsMock, azureMock)
@@ -192,8 +191,6 @@ class GetRoutesTest {
192191

193192
private fun externalContentFetcher(proxyHttpClient: ProxyHttpClient) = ExternalContentFetcher(
194193
proxyHttpClient = proxyHttpClient,
195-
aapBaseUrl = testParametersMap.getParameters("aap").baseUrl,
196-
aapClientId = "aap",
197194
meldekortClientId = "meldekort",
198195
meldekortBaseUrl = testParametersMap.getParameters("meldekort").baseUrl,
199196
aiaBaseUrl = testParametersMap.getParameters("aia").baseUrl,

src/test/kotlin/no/nav/tms/min/side/proxy/PostRoutesTest.kt

-2
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ class PostRoutesTest {
4141

4242
private fun externalContentFetcher(proxyHttpClient: ProxyHttpClient) = ExternalContentFetcher(
4343
proxyHttpClient = proxyHttpClient,
44-
aapClientId = "aap",
45-
aapBaseUrl = "",
4644
meldekortClientId = "meldekort",
4745
meldekortBaseUrl = "",
4846
aiaBaseUrl = "placeholder",

0 commit comments

Comments
 (0)